Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
joaquimscosta avatar

Spring Boot Web Api

  • 1 installs
  • 21 repo stars
  • Updated August 5, 2026
  • joaquimscosta/arkhe-claude-plugins

Implements Spring Boot 4 REST APIs: controllers, Bean Validation, ProblemDetail (RFC 9457) error handling, API versioning, and declarative HTTP clients.

About

Provides Spring Boot 4 REST API patterns with @RestController, request validation, global ProblemDetail error handling, and declarative @HttpExchange clients across MVC and WebFlux. A developer uses it when building REST endpoints in Spring Boot 4.

  • ProblemDetail (RFC 9457) global error handling
  • MVC vs WebFlux selection and @HttpExchange clients

Spring Boot Web Api by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #3,836 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/joaquimscosta/arkhe-claude-plugins --skill spring-boot-web-api

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars21
Last updatedAugust 5, 2026
Repositoryjoaquimscosta/arkhe-claude-plugins

What it does

Implements Spring Boot 4 REST APIs: controllers, Bean Validation, ProblemDetail (RFC 9457) error handling, API versioning, and declarative HTTP clients.

Files

SKILL.mdMarkdownGitHub ↗

Spring Boot Web API Layer

REST API implementation patterns for Spring Boot 4 with Spring MVC and WebFlux.

Technology Selection

ChooseWhen
Spring MVCJPA/JDBC backend, simpler debugging, team knows imperative style
Spring WebFluxHigh concurrency (10k+ connections), streaming, reactive DB (R2DBC)

With Virtual Threads (Java 21+), MVC handles high concurrency without WebFlux complexity.

Core Workflow

1. Create controller → 2. Define endpoints → 3. Add validation → 4. Handle exceptions → 5. Configure versioning

See WORKFLOW.md for detailed step-by-step instructions with code examples.

Quick Patterns

See EXAMPLES.md for complete working examples including:

  • REST Controller with CRUD operations and pagination (Java + Kotlin)
  • Request/Response DTOs with Bean Validation 3.1
  • Global Exception Handler using ProblemDetail (RFC 9457)
  • Native API Versioning with header configuration
  • Jackson 3 Configuration for custom serialization
  • Controller Testing with @WebMvcTest

Spring Boot 4 Specifics

  • Jackson 3 uses tools.jackson package (not com.fasterxml.jackson)
  • ProblemDetail enabled by default: spring.mvc.problemdetails.enabled=true
  • API Versioning via version attribute in mapping annotations
  • @MockitoBean replaces @MockBean in tests
  • @HttpExchange declarative HTTP clients (replaces RestTemplate patterns)
  • RestTestClient new fluent API for testing REST endpoints

@HttpExchange Declarative Client (Spring 7)

New 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.

Detailed References

  • Workflow: See WORKFLOW.md for detailed step-by-step web API implementation
  • Examples: See EXAMPLES.md for complete working code examples
  • Troubleshooting: See TROUBLESHOOTING.md for common issues and Boot 4 migration
  • Controllers & Validation: See references/CONTROLLERS.md for validation groups, custom validators, content negotiation
  • Error Handling: See references/ERROR-HANDLING.md for ProblemDetail patterns, exception hierarchy
  • WebFlux Patterns: See references/WEBFLUX.md for reactive endpoints, functional routers, WebTestClient

Related Skills

NeedSkill
DDD conceptsdomain-driven-design
Data layer for DTOsspring-boot-data-ddd
Controller testingspring-boot-testing
API securityspring-boot-security

Anti-Pattern Checklist

Anti-PatternFix
Business logic in controllersDelegate to application services
Returning entities directlyConvert to DTOs
Generic error messagesUse typed ProblemDetail with error URIs
Missing validationAdd @Valid on @RequestBody
Blocking calls in WebFluxUse reactive operators only
Catching exceptions silentlyLet propagate to @RestControllerAdvice

Critical Reminders

1. Controllers are thin — Delegate to services, no business logic 2. Validate at the boundary@Valid on all request bodies 3. Use ProblemDetail — Structured errors for all exceptions 4. Version from day one — Easier than retrofitting 5. `@MockitoBean` not `@MockBean` — Spring Boot 4 change

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.