How mkalaimalai/user-microservices-jpa works
Project type and purpose
• This is a single‐purpose “User” microservice built with Spring Boot and JPA.
• It exposes REST endpoints for CRUD operations on users (see UserRestController), persists data to a database via Spring Data JPA (UserRepository), and uses Ehcache for caching.
File structure
• Top-level build & infra:
• pom.xml, mvnw(.cmd) – Maven wrapper & build definition
• Dockerfile – containerization
• application-*.yml – environment-specific configs (dev, aws, default)
• ehcache.xml, logback-spring.xml – caching & logging
• Source code layout (classic layered pattern):
• controller/ – REST endpoints
• service/ – business logic
• repository/ – Spring Data JPA interfaces
• domain/ – JPA entities & enums
• mapper/ – DTO ↔ entity mapping
• vo/ – request/response objects (VOs)
• exception/ – centralized error handling
• Tests mirror the same structure under src/test.
README for additional insights
• “User Micro Services” indicates it’s one microservice in a potentially larger ecosystem.
• Builds & runs via Maven; exposes Swagger UI on port 8080.
• Provides sample curl for POST /api/user.