How manu-lopez/ecommerce-test works
• Client / API Consumer: Represent the external client (or users) that will send HTTP GET requests.
• API Gateway / Controller: Highlight the PriceController (along with the global exception handler, RestControllerExceptionHandler) that interfaces with incoming REST requests.
• Application Layer: Include the PriceService interface and implementation (PriceServiceImpl), DTO classes (like PriceDTO) and exception handling (PriceNotFoundException). This layer encapsulates business logic and orchestrates data flow between the controller and domain.
• Domain Layer: Mark domain objects such as PriceDO and BrandDO along with repository interfaces (PriceRepository). These represent the core business data and rules.
• External Systems/Database: Represent the underlying database system used by Spring Boot/JPA, connected through the repository adapter.
Separation of concerns and layered architecture
→ Presentation Layer: Where the REST endpoints and exception handlers exist.
→ Application Layer: Containing business services, DTOs, and the orchestrating logic.
→ Domain Layer: With core business models and repository interfaces.
→ Infrastructure Layer: Handling persistence, external frameworks (Spring Data JPA), and mappings.
• This separation reflects a clean architecture where business rules are isolated from external systems.
Technology and framework details
• That Maven is used for build management.
• Usage of JPA for data persistence and mapping (infrastructure repository classes and entity mapping).
• Mention that integration and unit tests (found under src/test) exist to validate the application and infrastructure components.
• Components like mappers and exception handlers are also shown, even if they are auxiliary, since they play a key role in converting data formats and handling errors.