Backend Tutorial#
Build a Palmyra-backed SpringBoot API, following the layout used by the thinxar/clinic sample. Handlers compose granular Palmyra interfaces (QueryHandler + ReadHandler + SaveHandler), JPA entities stay separate from Palmyra DTO models, and authorization is delegated to the palmyra-dbacl-mgmt extension rather than @Permission.
- Project setup — Gradle with a centralised
deps.gradle, SpringBoot entrypoint, MariaDB datasource,/apicontext path. - Entities, models, POJOs — JPA entities for persistence, Palmyra
@PalmyraTypemodels for the API contract, plain POJOs for custom queries. - Publish handlers —
AbstractHandlerbase + per-entity@Components composingQueryHandler,ReadHandler,SaveHandler. - ACL and extensions — wire
palmyra-dbacl-mgmtandpalmyra-dbpwd-mgmt, enforce auth with Spring Security. - Advanced — custom query filters, native SQL reports, bulk exports.
The sample’s frontend tutorial (Frontend track) consumes exactly this API.