From spring-boot
Implements Spring Boot 4 REST API patterns for controllers, validation with Bean Validation 3.1, ProblemDetail exceptions (RFC 9457), API versioning, WebFlux endpoints, Jackson 3 serialization, CORS, and @HttpExchange clients.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spring-boot:spring-boot-web-apiThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
REST API implementation patterns for Spring Boot 4 with Spring MVC and WebFlux.
REST API implementation patterns for Spring Boot 4 with Spring MVC and WebFlux.
| Choose | When |
|---|---|
| Spring MVC | JPA/JDBC backend, simpler debugging, team knows imperative style |
| Spring WebFlux | High concurrency (10k+ connections), streaming, reactive DB (R2DBC) |
With Virtual Threads (Java 21+), MVC handles high concurrency without WebFlux complexity.
See WORKFLOW.md for detailed step-by-step instructions with code examples.
See EXAMPLES.md for complete working examples including:
tools.jackson package (not com.fasterxml.jackson)spring.mvc.problemdetails.enabled=trueversion attribute in mapping annotations@MockBean in testsNew declarative HTTP client interface (alternative to RestTemplate/WebClient):
@HttpExchange(url = "/users", accept = "application/json")
public interface UserClient {
@GetExchange("/{id}")
User getUser(@PathVariable Long id);
@PostExchange
User createUser(@RequestBody CreateUserRequest request);
@DeleteExchange("/{id}")
void deleteUser(@PathVariable Long id);
}
// Configuration
@Configuration
class ClientConfig {
@Bean
UserClient userClient(RestClient.Builder builder) {
RestClient restClient = builder.baseUrl("https://api.example.com").build();
return HttpServiceProxyFactory
.builderFor(RestClientAdapter.create(restClient))
.build()
.createClient(UserClient.class);
}
}
Benefits: Type-safe, annotation-driven, works with both RestClient and WebClient.
| Need | Skill |
|---|---|
| DDD concepts | domain-driven-design |
| Data layer for DTOs | spring-boot-data-ddd |
| Controller testing | spring-boot-testing |
| API security | spring-boot-security |
| Anti-Pattern | Fix |
|---|---|
| Business logic in controllers | Delegate to application services |
| Returning entities directly | Convert to DTOs |
| Generic error messages | Use typed ProblemDetail with error URIs |
| Missing validation | Add @Valid on @RequestBody |
| Blocking calls in WebFlux | Use reactive operators only |
| Catching exceptions silently | Let propagate to @RestControllerAdvice |
@Valid on all request bodies@MockitoBean not @MockBean — Spring Boot 4 changenpx claudepluginhub joaquimscosta/arkhe-claude-plugins --plugin spring-bootProvides Spring Boot patterns for REST API design, layered architecture (Controller-Service-Repository), Spring Data JPA repositories, transactional services, DTO validation, and global exception handling. Useful for scalable Java backends.
Generates Spring Boot 3.x configurations, REST controllers, Spring Security 6 auth, Spring Data JPA or MyBatis-Plus data access, and reactive WebFlux endpoints. Use for microservices, Java REST APIs, or reactive Java apps.
Provides Spring Boot architecture patterns for REST APIs, layered services, data access, caching, async processing, and logging.