spring_boot

Implements Spring Boot 3 microservices with layered architecture, security, and testing workflows.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill spring-boot-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spring_boot
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/spring_boot
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill spring-boot-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building production-grade Spring Boot applications requires consistent architecture, correct security configuration, and thorough testing, which is easy to get wrong without expert guidance. ## Core Features & Use Cases - Layered Architecture Guidance: Enforces Controller-Service-Repository design with constructor injection and proper bean stereotypes. - Security & Validation: Configures Spring Security 6 with OAuth2/JWT, input validation via @Valid, and global error handling with @RestControllerAdvice. - Testing & Observability: Applies test slices (@WebMvcTest, @DataJpaTest), Testcontainers integration, and Actuator/Micrometer metrics. - Use Case: When building a new REST API backed by PostgreSQL, use this Skill to scaffold entities, repositories, services, controllers, DTOs, and tests following Spring Boot 3.x best practices. ## Quick Start Ask the agent to create a Spring Boot 3 REST API with JPA persistence, JWT security, and integration tests for your domain model.

Frequently Asked Questions about spring_boot

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a REST API with Spring Boot 3?

Create @RestController classes with proper HTTP method mappings, DTOs for requests and responses, and a service layer with constructor injection. Add @Valid for input validation and @RestControllerAdvice for global exception handling.

How to configure Spring Security 6 with JWT authentication?

Configure a SecurityFilterChain bean with OAuth2 resource server support for JWT validation. Define authorization rules per endpoint and avoid deprecated WebSecurityConfigurerAdapter patterns from Spring Security 5.

Does Spring Boot 3 support Java virtual threads?

Yes, Spring Boot 3.2+ supports Java 21 virtual threads via spring.threads.virtual.enabled=true. This improves throughput for high-concurrency blocking workloads without rewriting code to reactive style.

Should I use field injection or constructor injection in Spring?

Use constructor injection instead of @Autowired on fields. Constructor injection makes dependencies explicit, enables final fields, simplifies unit testing, and prevents circular dependency issues at runtime.

How do I test Spring Boot repositories and controllers?

Use test slices like @DataJpaTest for repositories and @WebMvcTest for controllers to run fast, isolated tests. For full integration tests with real databases, combine @SpringBootTest with Testcontainers.

When should I avoid mixing WebFlux and blocking code?

Avoid calling blocking APIs (like JPA or RestTemplate) inside reactive WebFlux pipelines, as it defeats the non-blocking model and can exhaust threads. Choose one stack per service or isolate blocking work on dedicated schedulers.