spring-boot

Solid

Use when building Spring Boot services. Covers dependency injection, transaction boundaries, JPA performance, configuration, validation, and testing slices.

Testing & QA 26 stars 3 forks Updated 3 weeks ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
48
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Spring Boot ## Purpose Build Spring Boot services with correct transaction boundaries and a JPA layer that does not issue a hundred queries to render a list. Spring's defaults are safe; its abstractions hide the cost of getting them wrong. ## When to Use - Building or reviewing a Spring Boot application. - Diagnosing lazy-loading exceptions or N+1 query behavior. - Getting transaction boundaries and propagation right. - Structuring a test suite that is faster than a full context load per class. ## Capabilities - Constructor injection and bean lifecycle. - Declarative transactions: propagation, isolation, rollback rules. - JPA/Hibernate: fetch strategies, entity graphs, projections. - Configuration properties with validation and profiles. - Test slices: `@WebMvcTest`, `@DataJpaTest`, Testcontainers. ## Inputs - The service, its entities, and the slow endpoint if there is one. - Database engine and connection pool configuration. ## Outputs - Services with explicit transaction boundaries. - Repositories that fetch exactly what the caller needs. - Tests that load the narrowest context that proves the behavior. ## Workflow 1. **Use constructor injection** — Field injection with `@Autowired` hides dependencies and makes the class untestable without a container. 2. **Place `@Transactional` at the service layer** — Not on the repository (too narrow, one transaction per call) and not on the controller (too wide, the transaction spans view rendering). 3. **Fetch deliberat...

Details

Author
nimadorostkar
Repository
nimadorostkar/Claude-Skills-collection
Created
1 months ago
Last Updated
3 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category