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.
npx claudepluginhub joaquimscosta/arkhe-claude-plugins --plugin spring-bootThis skill uses the workspace's default tool permissions.
REST API implementation patterns for Spring Boot 4 with Spring MVC and WebFlux.
Provides 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.
Provides Spring Boot patterns for REST APIs, controller-service-repository layers, JPA repositories, transactions, DTO validation, and exception handling in backend services.
Generates Spring Boot 3.x configurations, REST controllers, Spring Security 6 authentication, JPA repositories, and WebFlux endpoints for microservices and reactive Java apps.
Share bugs, ideas, or general feedback.
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 change