From spring-boot-knowledge-patch
Provides knowledge patch for Spring Boot 4.0 changes: modular starters, Jackson 3, Framework 7, Security 7, Spring AI 1.0, HTTP clients. Use before recent Spring Boot tasks.
npx claudepluginhub nevaberry/nevaberry-plugins --plugin spring-boot-knowledge-patchThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Implements structured self-debugging workflow for AI agent failures: capture errors, diagnose patterns like loops or context overflow, apply contained recoveries, and generate introspection reports.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Covers Spring Boot 3.4–4.0, Spring Framework 7.0, Spring Security 7.0, and Spring AI 1.0.
| Topic | Reference | Key features |
|---|---|---|
| Boot 4.0 migration | references/boot-4-migration.md | Modular starters, Jackson 3, HTTP service clients, RestTestClient, breaking changes |
| Spring Framework 7.0 | references/framework-7.md | @Retryable in core, BeanRegistrar, JmsClient, API versioning, JPA 3.2 |
| Spring Security 7.0 | references/security-7.md | PathPatternRequestMatcher, DSL cleanup, SPA CSRF, MFA, OAuth2 HTTP services |
| Spring AI 1.0 | references/spring-ai.md | ChatClient, @Tool, advisors/RAG, VectorStore, ChatMemory, MCP |
| Boot 3.4–3.5 features | references/boot-3.4-3.5.md | Structured logging, actuator access model, MockMvcTester, env properties import |
| Old (Boot 3.x) | New (Boot 4.0) |
|---|---|
spring-boot-starter-web | spring-boot-starter-webmvc |
spring-boot-starter-oauth2-client | spring-boot-starter-security-oauth2-client |
spring-boot-starter-oauth2-resource-server | spring-boot-starter-security-oauth2-resource-server |
spring-boot-starter | spring-boot-starter-classic (gradual migration) |
spring-boot-starter-test | spring-boot-starter-test-classic (gradual migration) |
(bare flyway-core) | spring-boot-starter-flyway (now required) |
(bare liquibase-core) | spring-boot-starter-liquibase (now required) |
Convention: spring-boot-<technology>, spring-boot-starter-<technology>, spring-boot-starter-<technology>-test.
Every technology now has a test starter companion. @WithMockUser requires spring-boot-starter-security-test.
Jackson 3 uses tools.jackson package (annotations stay in com.fasterxml.jackson.annotation).
| Old (Jackson 2) | New (Jackson 3) |
|---|---|
@JsonComponent | @JacksonComponent |
@JsonMixin | @JacksonMixin |
JsonObjectSerializer | ObjectValueSerializer |
Jackson2ObjectMapperBuilderCustomizer | JsonMapperBuilderCustomizer |
spring.jackson.read.* | spring.jackson.json.read.* |
spring.jackson.write.* | spring.jackson.json.write.* |
Compatibility module: spring-boot-jackson2 (deprecated). Properties under spring.jackson2.*.
Annotated interfaces get auto-configured implementations:
@HttpExchange(url = "https://echo.zuplo.io")
public interface EchoService {
@PostExchange
Map<?, ?> echo(@RequestBody Map<String, String> message);
}
Group registration with per-group configuration (Framework 7.0):
@ImportHttpServices(group = "weather", types = {WeatherApi.class})
@ImportHttpServices(group = "user", types = {UserApi.class})
class Config extends AbstractHttpServiceRegistrar {
@Bean
RestClientHttpServiceGroupConfigurer configurer() {
return groups -> groups.filterByName("weather")
.forEachClient((g, b) -> b.defaultHeader("X-Api-Key", key));
}
}
Non-reactive alternative to WebTestClient. Works with @SpringBootTest, @AutoConfigureMockMvc, or random port:
@Autowired
RestTestClient restTestClient;
Replace custom HttpMessageConverter beans with customizers:
@Bean
ServerHttpMessageConvertersCustomizer myCustomizer() {
return converters -> converters.jsonMessageConverter(myConverter);
}
// Also: ClientHttpMessageConvertersCustomizer for client-side
Spring Retry merged into spring-core. Enable with @EnableResilientMethods:
@Configuration
@EnableResilientMethods
class AppConfig { }
@Service
class MyService {
@Retryable(maxAttempts = 3)
public String fetchData() { ... }
@ConcurrencyLimit(limit = 5)
public String limitedOp() { ... }
}
MvcRequestMatcher and AntPathRequestMatcher removed. Use PathPatternRequestMatcher:
http.authorizeHttpRequests(auth -> auth
.requestMatchers("/api/**").hasRole("USER")
.anyRequest().authenticated()
);
DSL cleanup: and() removed (use lambda DSL), authorizeRequests removed (use authorizeHttpRequests).
SPA CSRF: http.csrf(csrf -> csrf.spa());
@Autowired ChatClient chatClient;
String answer = chatClient.prompt()
.user("What is Spring Boot?")
.call()
.content();
// Structured output
record ActorFilms(String actor, List<String> movies) {}
ActorFilms result = chatClient.prompt()
.user("List films with Tom Hanks")
.call()
.entity(ActorFilms.class);
Tool calling:
chatClient.prompt()
.user("What's the weather in London?")
.tools(weatherTools) // @Tool-annotated @Component
.call()
.content();
logging.structured.format.console=ecs # ecs, gelf, or logstash
logging.structured.format.file=logstash
Endpoint enabled/disabled replaced with fine-grained access control:
management.endpoints.access.default=unrestricted
management.endpoint.health.access=read-only
management.endpoints.access.max-permitted=read-only # operator cap
Values: none, read-only, unrestricted. Old enabled properties are deprecated.
spring.http.client.factory=jdk # http-components, jetty, reactor, jdk, simple
spring.http.client.redirects=dont-follow # default: follow
Auto-detection order: Apache HC > Jetty > Reactor Netty > JDK HttpClient > Simple.
RestClientjavax.annotation/javax.inject removed — use jakarta.*ListenableFuture removed — use CompletableFuturejava -jar directlyspring.data.mongodb.* → spring.mongodb.*RestClient → Rest5Clienthibernate-jpamodelgen → hibernate-processor@EntityScan moved to org.springframework.boot.persistence.autoconfigure.EntityScanspring.dao.exceptiontranslation.enabled → spring.persistence.exceptiontranslation.enabledmanagement.tracing.enabled → management.tracing.export.enabledlogging.console.enabled=false disables console loggingspring-boot-starter-tomcat-runtime instead of spring-boot-starter-tomcat@Retryable insteadspring-security.version| File | Contents |
|---|---|
| boot-4-migration.md | Modular starters, Jackson 3, HTTP services, RestTestClient, OpenTelemetry, breaking changes |
| framework-7.md | @Retryable/@ConcurrencyLimit, BeanRegistrar, JmsClient, API versioning, JPA 3.2, HttpHeaders |
| security-7.md | PathPattern matchers, DSL cleanup, SPA CSRF, MFA, Authorization Server, OAuth2 HTTP services |
| spring-ai.md | ChatClient, @Tool, advisors/RAG, VectorStore, ChatMemory, MCP server/client |
| boot-3.4-3.5.md | Structured logging, actuator access, RestClient config, MockMvcTester, bean defaults, env import |