spring-boot-idioms
CommunityWrite idiomatic, production-ready Spring Boot
Software Engineering#testing strategy#dependency injection#spring boot#spring data jpa#java rest api#actuator observability
Authorirahardianto
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Spring Boot projects often drift into non-idiomatic patterns (field injection, leaky entities, scattered transactions) that reduce testability, observability, and long-term maintainability.
Core Features & Use Cases
- Constructor-based dependency injection: Enforce constructor injection and prefer strongly typed configuration with @ConfigurationProperties over @Value.
- Spring Data JPA best practices: Use derived queries and projections to avoid loading full entities, and place @Transactional on service methods rather than repositories.
- REST controller and error handling conventions: Expose DTOs from @RestController, apply @ControllerAdvice for global exceptions, and structure endpoints with validation-friendly request/response contracts.
- Production observability guidance: Enable Actuator health/metrics/info, use Micrometer for custom metrics, and adopt structured logging with MDC correlation IDs.
- Test strategy patterns: Use @SpringBootTest for integration testing, @WebMvcTest for controller slices, and TestContainers for database integration tests.
- Use Case: Standardize a new Spring Boot API codebase so controllers, services, repositories, tests, and observability align with consistent, maintainable conventions from day one.
Quick Start
Ask the agent to refactor the given Spring Boot project code to follow the spring-boot-idioms skill for dependency injection, REST DTOs, JPA usage, actuator observability, and testing.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: spring-boot-idioms Download link: https://github.com/irahardianto/awesome-agv/archive/main.zip#spring-boot-idioms Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.