Notes
01 May, 2023
Draft: Ports and Adapters
Project structure
- **Application/Core**
- Defines
- UseCase interface
- UseCase implementation
- Repository interfaces specified by the **Domain**
- Command objects are self-validating
- References
- Domain project
- **Domain**
- Entities
- Self-validating
- SPI
- **Output Port** - Repository interface
- **Infrastructure**
- Adapters
- Rest
- Includes application module
- Spring Controllers
- DTO Validation
- Create command and invoke use case
- Persistence
- Includes domain module
- Implement repository using JDBI
- **Bootstrap**
- SpringBootApplication launcher
- Maven project includes modules
- Load Application/Domain services into the
Spring context by scanning @DomainService annotations.