spring-boot
Spring Boot engineering: layered structure, DI, config/profiles, MVC/WebFlux, validation, transactions, JPA, Actuator, Testcontainers. Use for Spring Boot services; auth specifics in spring-security.
SKILL.mdskills/frameworks/spring-boot/SKILL.md
GitHubspring-boot
Boot favors convention: structure by domain, configure externally, test against real infrastructure.
Activate when
- Building or changing Spring Boot services: controllers, services, repositories, config, transactions, tests, production setup.
Do NOT activate for
- Authentication/authorization design (see frameworks/spring-security); plain-Java concerns (see languages/java).
Procedure
- Version: detect Spring Boot generation from pom.xml/build.gradle; research in https://docs.spring.io/spring-boot/ for THAT generation (Boot 2→3 namespace and Security changes bite). Consult https://docs.spring.io/spring-framework/reference/ for core semantics.
- Structure: controller (HTTP only) → service (transactions, orchestration) → repository/domain; DTOs at the web boundary, never expose JPA entities; MapStruct/manual mappers explicit.
- DI/config: constructor injection;
@ConfigurationProperties+ profiles over scattered@Value; secrets from vault/env, never properties files in git. - Web: Spring MVC by default; WebFlux only for proven non-blocking need (R2DBC drivers end-to-end); validation with Bean Validation at the boundary; global
@ControllerAdviceerror envelope (RFC-7807 shape). - Data: Spring Data repositories + explicit queries; transactions at service layer with correct propagation/isolation; N+1 checked via query logs; Flyway/Liquibase migrations versioned and reversible (see https://docs.spring.io/spring-data/ and https://hibernate.org/orm/documentation/).
- Observability: Actuator health/info/metrics, Micrometer + tracing, structured logs; readiness/liveness probes wired to real checks.
- Testing: JUnit 5 + Mockito for units,
@SpringBootTestslices for integration, Testcontainers for Postgres/Kafka/Redis reality (see https://testcontainers.com/guides/). - Production: externalized config, graceful shutdown, connection-pool sizing, banner/endpoint exposure locked down.
- Verify: full test suite green on pinned JDK, migration up+down on scratch DB, actuator endpoints reviewed for exposure.
Failure modes
- Boot-generation API drift; lazy-loading outside transactions; transactions on private/self-invoked methods (proxy bypass); actuator overexposure.
References
- Registry:
../../research/documentation-search/references/framework-registry.yaml(spring-boot, spring-framework, spring-data, hibernate, junit, mockito, testcontainers).