How ehabqadah/spring-boot-microservices-best-practices works
Project Type and Purpose
• This is a single Spring-Boot microservice offering REST APIs to manage orders.
• It uses a layered architecture (Controller → Service → Data/Repository) with Hibernate, Flyway, MySQL, Swagger (OpenAPI), and Spring Actuator for management.
File Structure
• Top-level:
• Dockerfile & docker-compose/ — for local MySQL container
• kubernetes/ — for Kubernetes deployment
• pom.xml, mvnw — Maven build
• src/main/java/com/qadah/demo:
• config — OpenAPIConfig
• controller — REST controllers and exception handler
• data/model — JPA entities, ID generators
• data/dto — input/output models
• service — business logic
• src/main/resources/application.properties — database & environment configuration
README Insights
• REST-based endpoints documented via Swagger UI
• Local MySQL setup via Docker Compose
• Deployment targeted to Kubernetes