spring-boot-4-conventions

Installation
SKILL.md

Spring Framework 7 / Spring Boot 4 conventions

Java 25 + Spring Framework 7 + Spring Boot 4. Prefer the most modern idiom unless an ADR explains otherwise.

Defaults to apply

Package layout — by feature, not by layer

Top-level packages are bounded contexts / features, not technical layers. Inside a feature, split by visibility (api published, private impl hidden). For the private impl sub-packages, apply the following rule:

  • One class of a given type (single entity, single service, etc.) — keep it directly in the feature package (no sub-package).
  • Multiple classes of the same type — use a typed sub-package within the feature:
    • model/ — JPA entities
    • repository/ — Spring Data repositories
    • service/ — service classes / implementations
    • service/ — service implementations
  • Inside api/ — keep the controller (or service interface) at the api/ level; put all request/response DTO records in an api/dto/ sub-package.
Installs
1
GitHub Stars
39
First Seen
Jun 4, 2026
spring-boot-4-conventions — loiane/specs-driven-development-spring-angular