This project is a Spring Boot starter template designed with a layered architectural pattern for building RESTful APIs. It incorporates key technologies such as Docker for containerization, Flyway for database versioning, MySQL as the relational database, and Hibernate for data persistence.
- Spring Boot: A powerful framework for building Java-based enterprise applications.
- Docker: A containerization platform that simplifies the deployment process.
- Flyway: A database migration tool that helps version control database schema.
- MySQL: A widely used open-source relational database management system.
- H2: A open-source in-memory relational database management system.
- Hibernate: An object-relational mapping (ORM) framework for Java.
The project follows a layered architecture to promote modularity and maintainability. The main layers include:
- Controller Layer: Handles incoming HTTP requests, processes them, and returns appropriate responses.
- Service Layer: Contains the business logic, acting as an intermediary between controllers and repositories.
- Repository Layer: Manages data access and interacts with the database.
- Model Layer: Represents the data structure and entities.
To use this template as a starting point for your Spring Boot project:
-
Clone the repository:
git clone https://github.com/ungaratto93/layers.git
-
Replace the existing code with your application-specific logic.
-
Customize the
application.properties
file in thesrc/main/resources
directory for your database configuration. -
Add additional layers or modify the existing ones based on your project requirements.
-
Build and run your customized application.
Contributions are welcome! Feel free to open issues or submit pull requests for any enhancements or bug fixes.
This project is licensed under the MIT License