Create Spring Boot projects with Java 25 and Spring Boot 4...
Use this skill to create new Spring Boot 4 projects or define their structure before implementation. The skill adds value when the user needs an architecture decision, Spring Boot 4 feature selection, or the bundled templates in assets/.
assets/ instead of rewriting the same scaffolding from scratch.Collect the project constraints first:
Use this matrix as the default decision aid. If the choice is not obvious, read references/architecture-guide.md before proceeding.
| Pattern | Use when | Complexity |
|---|---|---|
layered |
CRUD services, prototypes, MVPs | Low |
package-by-module |
3-5 distinct features with moderate growth | Low-Medium |
modular-monolith |
Module boundaries matter and Spring Modulith is justified | Medium |
tomato |
Rich domain modeling, value objects, stronger type safety | Medium-High |
ddd-hexagonal |
Complex domains, CQRS, strong infrastructure isolation | High |
Use Spring Initializr and capture the baseline:
Baseline dependencies for most projects:
Optional dependencies based on architecture or features:
Read references/spring-boot-4-features.md before selecting:
Use the bundled templates from assets/ and replace placeholders only after the package and module names are settled.
Core project templates:
assets/controller.javaassets/repository.javaassets/rich-entity.javaassets/value-object.javaassets/service-cqrs.javaassets/exception-handler.javaassets/flyway-migration.sqlassets/docker-compose.ymlBoot 4 and modularity templates:
assets/http-service-client.javaassets/api-versioning-config.javaassets/resttestclient-test.javaassets/package-info-jspecify.javaassets/modularity-test.javaassets/resilience-service.javaassets/pom-additions.xmlassets/testcontainers-test.javaRead references/architecture-guide.md for package structure and apply the matching templates:
layered: keep modules simple and avoid premature DDD abstractionspackage-by-module: group by feature and keep shared code minimalmodular-monolith: add Modulith verification and explicit module APIstomato: add value objects and rich domain entities where they protect important invariantsddd-hexagonal: separate application, domain, and infrastructure explicitlyspring-data-jpa when the user needs deeper query, projection, repository, or relationship decisions.springboot-migration for upgrades of existing applications rather than new-project setup.references/architecture-guide.mdreferences/spring-boot-4-features.mdWhen the user asks for a plan or scaffold recommendation, return:
## Recommended architecture
- Pattern:
- Why:
## Initial setup
- Build tool:
- Java version:
- Spring Boot version:
- Core dependencies:
## Assets to apply
- `assets/...`
## Next implementation steps
1. ...
2. ...
3. ...