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.

  1. Project setup — Gradle with a centralised deps.gradle, SpringBoot entrypoint, MariaDB datasource, /api context path.
  2. Entities, models, POJOs — JPA entities for persistence, Palmyra @PalmyraType models for the API contract, plain POJOs for custom queries.
  3. Publish handlersAbstractHandler base + per-entity @Components composing QueryHandler, ReadHandler, SaveHandler.
  4. ACL and extensions — wire palmyra-dbacl-mgmt and palmyra-dbpwd-mgmt, enforce auth with Spring Security.
  5. Advanced — custom query filters, native SQL reports, bulk exports.

The sample’s frontend tutorial (Frontend track) consumes exactly this API.