Spring Boot Development
Use this skill for routine Spring Boot work. Read only the matching file in references/.
Use This Skill When
| Situation | Use this skill |
|---|---|
| Project setup | Create or align a Spring Boot project |
| Application changes | Add or change controller, service, DTO, entity, or repository code |
Workflow
- Identify the phase: setup, web, or persistence.
- Read the matching reference file only.
- Reuse project conventions.
- Make the smallest coherent change.
- Run the narrowest validation.
Reference Map
| Topic | Reference |
|---|---|
| Project setup and shared conventions | references/common.md |
| Controller, request, response, and API validation | references/controller.md |
| Use-case logic and transaction boundaries | references/service.md |
| Entity, repository, mapper, and persistence | references/dao.md |
Rules
| Rule | Meaning |
|---|---|
| Separate layers | Keep controller, service, and persistence concerns separate |
| Add only what is needed | Do not add DTOs, entities, mappers, or repositories unless the use case needs them |
| Check version-sensitive behavior | Check Spring docs when behavior is version-sensitive |
Quick Decisions
| Decision | Default |
|---|---|
| When to use a DTO | When the API contract differs from the persistence model or needs request validation |
| When to use an entity | Only for persisted domain state |
| When to add mapping | When both DTOs and entities exist |
| When to split services | When they have multiple reasons to change |