Zero Boilerplate
One annotation on your JPA entity produces a full CRUD REST API — controller, service, repository, and more. No hand-written code required.
@Entity@SproutResourcepublic class Book { @Id private Long id; private String title; private String author;}GET /api/books → 200 OK (list)GET /api/books/{id} → 200 OK | 404 Not FoundPOST /api/books → 201 CreatedPUT /api/books/{id} → 200 OK | 404 Not FoundDELETE /api/books/{id} → 204 No Content | 404 Not FoundPlus a SproutBookRepository, SproutBookService, SproutBookOperations interface, and a
SproutBookMarker constants class — all generated at compile time, zero runtime reflection.
Zero Boilerplate
One annotation on your JPA entity produces a full CRUD REST API — controller, service, repository, and more. No hand-written code required.
Compile-Time Generation
Everything is generated by Java’s standard annotation processing API during javac. No runtime bytecode manipulation, no reflection overhead.
Granular Endpoint Control
Use readOnly, include, and exclude on @SproutResource to expose exactly the surface you want — nothing more.
Security Policies
Attach Spring Security @PreAuthorize expressions per operation with @SproutPolicy. SpEL expressions are validated at compile time so policy typos never reach production.
OpenAPI / Swagger
When SpringDoc is on the classpath, Sprout automatically decorates generated controllers with @Tag and @ApiResponses — no extra configuration needed.
Designed to be Overridden
The controller depends on a generated Operations interface, not the concrete service. Extend the service, mark it @Primary, and override only the methods you need.
Unified Error Handling
The optional sprout-runtime module registers a @RestControllerAdvice that converts exceptions into consistent, structured JSON error responses with per-field validation details.