Skip to content

Spring WebMVC

jsonapi-java-spring-webmvc adds opt-in JSON:API 1.1 handling to Spring MVC controllers: media negotiation, request/query context, resource DTO binding and protocol errors. Ordinary MVC endpoints are unaffected.

This is a companion to the framework-neutral jsonapi-java guide. Spring and Core have independent release trains. Your application still owns controllers, persistence, authorization and query execution.

Compatibility

Requirement Verified baseline
Java 21+
Spring Framework 7.0.x; minimum 7.0.9
Servlet API Jakarta Servlet 6.1
jsonapi-java API/query Included transitively; compatible Core baseline below
Consumer runtime Jackson 3, application-supplied

The Spring adapter is Jackson-neutral. Applications supply a neutral JsonApi runtime; the verified consumer example constructs it with Jackson 3. Spring Boot auto-configuration, WebFlux and persistence integrations are not included. Use a currently patched Spring 7.0.x release; the minimum is not a promise of future security updates.

Installation and dependencies

Add the released WebMVC companion from Maven Central:

dependencies {
    implementation("com.kazforge:jsonapi-java-spring-webmvc:0.1.0")
}

WebMVC brings the neutral Core API and query libraries transitively; do not add them again. It deliberately does not include a JSON runtime. For the verified Jackson 3 setup, also add this line to your dependencies block:

implementation("com.kazforge:jsonapi-java-jackson3:0.4.0")

The Jackson 3 version above is this Spring release's verified Core baseline. Update it only when Spring deliberately adopts a newer Core baseline; Spring and Core are independently versioned. See the Core getting-started guide for the neutral runtime setup. No separate Spring BOM or Boot starter is published.

Next: Register the WebMVC adapter and opt in per controller.