Package dev.akif.crud
package dev.akif.crud
spring-boot-crud is a library that provides opinionated, REST-ful and
generic CRUD (Create, Read, Update and Delete) operations on data models in a
backend API application using Spring Boot. Its purpose is to eliminate duplication.
It provides
- a controller base type with create, getAll (list with pagination), get, update and delete endpoints
- a service base type with methods corresponding to provided endpoints
- a repository base type to provide data access interface
- DTO (Data Transfer Object) base types for creating, updating and getting to use at API layer
- Model base types for creating, updating and getting to use at service layer
- Entity base type to use at data layer
- Logging at different layers and levels
- OpenAPI documentation with Swagger UI
See
-
ClassDescriptionBaseCreateDTO<I extends Serializable,
M extends BaseModel<I>, E extends BaseEntity<I, M>, CM extends BaseCreateModel<I, M, E>> Base DTO that contains required data to create a new entityBase model that contains required data to create a new entityBaseDTO<I extends Serializable>Base DTO of an entityBase entity of a data model representing its persisted structureBaseModel<I extends Serializable>Base model of a data modelBaseUpdateDTO<I extends Serializable,M extends BaseModel<I>, E extends BaseEntity<I, M>, UM extends BaseUpdateModel<I, M, E>> Base DTO that contains required data to update an existing entityBase model that contains required data to update an existing entityCRUDController<I extends Serializable,D extends BaseDTO<I>, M extends BaseModel<I>, E extends BaseEntity<I, M>, CM extends BaseCreateModel<I, M, E>, UM extends BaseUpdateModel<I, M, E>, CD extends BaseCreateDTO<I, M, E, CM>, UD extends BaseUpdateDTO<I, M, E, UM>, R extends CRUDRepository<I, M, E>, S extends CRUDService<I, M, E, CM, UM, R>> Base implementation of a CRUD controller for API layerError model of the API operationsWrapper for aCRUDError
as aRuntimeException
so it can be thrownDefaultExceptionHandler
implementation forCRUDErrorException
Base interface of a CRUD repository for data layerCRUDService<I extends Serializable,M extends BaseModel<I>, E extends BaseEntity<I, M>, CM extends BaseCreateModel<I, M, E>, UM extends BaseUpdateModel<I, M, E>, R extends CRUDRepository<I, M, E>> Base implementation of a CRUD service for business layerPaged<A>Container of paged data with its pagination info