Skip to content
commons-rest logocommons-rest logo

commons-rest

Focus on tough problems, not on CRUD — small, focused Spring Boot modules for REST services with clean DTOs, typed errors and generated TypeScript clients.
Maven Centralbuild status

Stable pagination DTO

PageableResult wraps Spring Data pages into a serializable, framework-neutral JSON shape — with factories, mapping and an optional meta extension.

Paginate results →

TypeScript clients for free

Annotate your controllers with @QueryHook / @MutationHook and generate axios clients, react-query hooks and Zod schemas straight from your OpenAPI doc.

Generate a client →

Ids that don't leak

Expose hashids-obfuscated or time-sorted TSID identifiers instead of raw database ids — decoded transparently in path variables, params and JSON.

Obfuscate your ids →

Auto-configured & optional

Every module is a Spring Boot auto-configuration: add the dependency and it works. Every bean is @ConditionalOnMissingBean, every feature has an off-switch property.

Browse all properties →

Problem details built in

Throw NotFoundException anywhere — auto-configured handlers render RFC 9457 application/problem+json responses, including a per-field map for bean-validation errors.

See error handling →

Clean DTO separation

Entity, Read and Write are separate types with a tiny converter interface between them — response shape and create/update payload evolve independently.

Understand the concepts →

We at rocketbase.io build many microservices. Tools like spring-data-rest take flexibility away the moment you leave the happy path, and full-blown generators bring a mountain of dependencies. commons-rest takes a different approach: it provides the small building blocks every REST service needs — and stays out of your way for everything else. Your controllers remain plain Spring MVC; you keep full control.