PanacheEntityResource is a Quarkus REST Data interface for exposing CRUD operations on a Panache entity through the active record model. Quarkus generates the corresponding JAX-RS resource during the build. section 7.4
Use it by:
- Adding the quarkus-hibernate-orm-rest-data-panache extension, alongside the JDBC driver and REST JSON serialization extension when needed. section 7.4
- Declaring an interface that extends PanacheEntityResource<Entity, Id>, supplying the entity class and identifier type. section 7.4
- Customizing inherited operations with REST Data annotations when the generated defaults require adjustment. section 7.4
Expose Reservation CRUD operations
interface ReservationCrudResource extends PanacheEntityResource<Reservation, Long> { }
Customize the resource path
@ResourceProperties(path = "/admin/reservation") interface ReservationCrudResource extends PanacheEntityResource<Reservation, Long> { }
