spring-boot-4

Enforce Spring Boot 4.0 rules for APIs, nullability, Jackson 3, and testing.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/dprice-dev/claude-java-skills --skill spring-boot-4-dprice-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spring-boot-4
Source: https://github.com/dprice-dev/claude-java-skills/tree/main/.claude/skills/spring-boot-4
Command: npx skills add https://github.com/dprice-dev/claude-java-skills --skill spring-boot-4-dprice-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents enterprise teams from producing Spring Boot 4 code that violates project-wide contracts, uses deprecated APIs, or breaks compilation and testing conventions.

Core Features & Use Cases

  • Opinionated SB4 development rules covering nullability (JSpecify), Jackson 3 usage, modular starters, compiler lint/werror expectations, and Java 25 safe feature guidance.
  • Spec-driven REST development that enforces OpenAPI-first workflows and ensures controllers implement generated interfaces for compile-time conformance.
  • Mandatory SB4 testing patterns including RestTestClient defaults, correct slice selection, AssertJ-only assertions, and layered test topology aligned to a narrow-test pyramid.
  • Provider-side Pact verification wiring for contract testing that validates HTTP responses against consumer pacts during tasks.check.

Quick Start

Use the spring-boot-4 skill when you’re generating or reviewing any Spring Boot code so the output follows the project’s mandatory SB4 rules and test/contract expectations.

Frequently Asked Questions about spring-boot-4

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

FAQPage Schema
How do I ensure my Spring Boot 4 code compiles with strict compiler flags and avoids deprecated APIs?

To ensure Spring Boot 4 code compiles cleanly, you must enforce non-deprecated APIs, JSpecify nullability, and Jackson 3 conventions while adhering to compiler lint and werror expectations for strict compatibility.

What is the correct way to test REST endpoints in Spring Boot 4?

The correct way to test Spring Boot 4 REST endpoints involves using RestTestClient defaults, selecting the correct test slices, and writing AssertJ-only assertions to maintain a layered test topology aligned to a narrow-test pyramid.

How do I generate Spring Boot 4 controllers from an OpenAPI spec?

Generating Spring Boot 4 controllers from an OpenAPI spec requires an OpenAPI-first workflow where controllers implement generated interfaces, ensuring compile-time conformance to the defined HTTP contracts and preventing runtime drift.

Does Spring Boot 4 support Pact provider verification during the build check task?

Yes, Spring Boot 4 supports Pact provider verification by wiring contract testing directly into the build process, validating HTTP responses against consumer pacts automatically during the standard tasks.check lifecycle.

Can I use Spring Boot 3 imports and patterns when updating dependencies to modular starters?

No, when updating dependencies to Spring Boot 4 modular starters, you must avoid deprecated Spring patterns and SB3-era imports, transitioning fully to JSpecify nullability and Jackson 3 conventions to prevent compilation errors.

Why does my Spring Boot 4 build fail with werror when using older nullability annotations?

Your Spring Boot 4 build fails because strict compiler lint and werror expectations require JSpecify nullability conventions, rendering older nullability annotations invalid and forcing compile-time errors for non-compliant code.