This library provides an agile and straightforward solution for creating CRUD (Create, Read, Update, Delete) operations and their respective endpoints in Spring Boot applications using annotations compatible with Netflix Eureka(disable with application.propeties "eureka.client.enabled=false"), available in Sonatype Maven Central:
https://central.sonatype.com/artifact/cloud.webgen.web.starter/web-starter
- Automatic CRUD Endpoint Generation: With a simple annotation, the endpoints for handling CRUD operations of an entity are automatically created.
- Generic CRUD Implementation: A generic CRUD service transparently handles CRUD operations for any type of entity.
- SQL and NoSQL Support: Thanks to the
AuditRepositoryinterface, it can be used with SQL or NoSQL repositories. - Base Audit Model: The
BaseAuditModelclass provides a base structure for audit handling and common fields.
- SQL + JPA implementation , this implementation uses the jpa library and provides the components required for allow his use with SQL databases:
https://github.com/Camilo2102/web-starter-sql
- MongoDB implementation , this implementation uses the mongo library and provides the components required for allow his use with MongoDB:
https://github.com/Camilo2102/web-starter-nosql
The library consists of the following core components:
@AutoControlableannotationApiControllerclassCrudServiceclassAuditRepositoryinterfaceBaseAuditModelclass
- Create an entity class that extends
BaseAuditModeland annotate it with@AutoControlable. - Define a repository for the entity that implements
AuditRepository. - Inject the repository into your Spring Boot application.
- The library will automatically generate the CRUD endpoints for your entity.