Organize by business feature, with layers inside each feature, rather than one global `controllers`, `services`, and `repositories` package: ```text com.example.app order/ OrderController.java // web adapter OrderService.java // business orchestration OrderRepository.java // persistence adapter/port OrderRequest.java OrderResponse.java // records user/ ... shared/ error/ ``` The dependency direction is inward: web depends on service/domain, and persistence impl...
Scanned 9/5/2026
Install to Claude Code
npx -y skills add HoangNguyen0403/agent-skills-standard --skill spring-boot-architecture --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Spring Boot Architecture?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-spring-boot-architecture-agent-skills-standard)More formats (shields.io, HTML) on the badges page.
Organize by business feature, with layers inside each feature, rather than one global `controllers`, `services`, and `repositories` package:
```text
com.example.app
order/
OrderController.java // web adapter
OrderService.java // business orchestration
OrderRepository.java // persistence adapter/port
OrderRequest.java
OrderResponse.java // records
user/
...
shared/
error/
```
The dependency direction is inward: web depends on service/domain, and persistence implements an inner-facing repository port. Services must not depend on controllers. Controllers should handle HTTP, `@Valid`, and DTO mapping; services should own business rules, orchestration, and transaction boundaries; repositories should do database work only.
Use Java 17+ records for immutable API DTOs and never return a JPA entity directly. Add `@RestControllerAdvice` with RFC 7807 `ProblemDetail` for errors and Jakarta Bean Validation constraints on input DTOs. Put `@Transactional` on the service boundary, normally with `readOnly = true` for read paths. A practical verification pass checks that every response is a DTO, every input is validated, no inner layer imports web classes, and error responses do not expose stack traces.
Is this your skill, or is something wrong with this listing? . Author removals are honored within 72 hours.
No comments yet. Be the first to comment!