Spring Boot 4: What's New, Release Date, and Should You Upgrade?
backend
10 min read
Spring Boot 4 shipped in November 2025 with a Java 17 baseline, JSpecify null-safety, and modular architecture. Here's what changed, what broke, and whether you should upgrade now.

Published By: Nelson Djalo | Date: March 24, 2026
Spring Boot 4 landed in November 2025 alongside Spring Framework 7, and it is the biggest release since the Spring Boot 3 jump to Jakarta EE. If you have been tracking the Spring Boot 4 release date or waiting for clarity on the Spring Boot 4 roadmap, this post covers everything you need to know: the actual features, what broke, and whether upgrading right now makes sense for your team.
Let's get into it.
Spring Boot 4.0 GA shipped on November 20, 2025, arriving alongside Spring Framework 7.0. The first milestone builds started appearing in mid-2025, with RC1 dropping in October 2025.
If you were following the spring boot latest version 2025 timeline, here is how the releases progressed:
Spring Boot 3.4.x continues to receive maintenance updates, so you are not being forced off of it immediately. But active feature development now happens exclusively on the 4.x line.
For a broader look at where the framework is headed, check out the Spring Boot Roadmap.
Spring Boot 4 requires Java 17 as the minimum version. If you are already on Spring Boot 3.x with Java 17+, this is a non-issue. The bigger headline is first-class support for Java 25, including record patterns, unnamed variables, string templates (finalized), and structured concurrency.
This means you can write cleaner, more expressive code out of the box without worrying about compatibility.
Spring Framework 7 adopted JSpecify as the standard null-safety annotation set, replacing the older @Nullable and @NonNull from org.springframework.lang. Spring Boot 4 builds on this throughout its auto-configuration and starter code.
What this means in practice: your IDE and static analysis tools get much better at catching null-related bugs at compile time rather than runtime. If you use Kotlin, the JSpecify annotations integrate naturally with Kotlin's type system.
The Spring Boot codebase itself has been restructured into a more modular layout. This does not change how you write application code, but it improves build times for the framework team and makes it easier to contribute.
For end users, the practical benefit is smaller dependency footprints. You pull in fewer transitive dependencies that you never asked for.
The declarative HTTP client interface, introduced experimentally in Spring Boot 3.2, is now fully stable. You define an interface, annotate methods with @GetExchange, @PostExchange, and so on, and Spring generates the implementation at runtime.
@HttpExchange("/api/users")
public interface UserClient {
@GetExchange
List<User> findAll();
@GetExchange("/{id}")
User findById(@PathVariable Long id);
@PostExchange
User create(@RequestBody User user);
}
No more manually wiring RestTemplate or WebClient for straightforward API calls. The framework handles serialization, error propagation, and connection management.
GraalVM native image compilation has been a focus since Spring Boot 3.0, but version 4 brings significant improvements:
If you previously tried native images and hit walls with reflection configuration, it is worth retesting on 4.0.
Spring Boot 4 deepens its integration with Micrometer and OpenTelemetry. The auto-configuration for traces, metrics, and logs is more unified:
The spring-boot-starter-actuator now includes observability defaults that previously required manual bean registration.
While Spring Boot 3.2 introduced virtual thread support behind a property flag, Spring Boot 4 makes virtual threads the recommended threading model when running on Java 21+. The auto-configuration detects your JVM version and adjusts thread pools accordingly.
This means Tomcat and Jetty handlers use virtual threads by default on Java 21+, which drastically improves throughput for I/O-heavy applications without changing your code.
If you jumped from Spring Boot 2.x directly to 4.0, you will hit the javax.* to jakarta.* namespace change. This migration actually happened in Spring Boot 3.0, but some teams skipped 3.x entirely. Every import referencing javax.servlet, javax.persistence, or javax.validation needs to change.
Spring provides the OpenRewrite migration recipe to automate this.
Spring Boot 4 removed APIs that were deprecated in the 3.x line. The notable ones:
spring.config.use-legacy-processing property - removed entirelyWebSecurityConfigurerAdapter pattern - gone (use SecurityFilterChain beans)RestTemplate auto-configuration moved to opt-in only - RestClient is the default@ConfigurationProperties binding modes that relied on mutable setters without @ConstructorBindingIf your codebase compiled cleanly on Spring Boot 3.4 with zero deprecation warnings, you are in good shape.
Spring Boot 4 ships with Spring Security 7, which changes some defaults:
authorizeRequests() DSL is removed - use authorizeHttpRequests() exclusivelyReview your security configuration carefully before upgrading.
| Area | Spring Boot 3.x | Spring Boot 4.0 |
|---|---|---|
| Minimum Java | Java 17 | Java 17 (supports up to Java 25) |
| Spring Framework | 6.x | 7.0 |
| Null-safety | Spring @Nullable | JSpecify annotations |
| HTTP Client | RestClient (new), RestTemplate (deprecated) | Declarative @HttpExchange (stable) |
| Native Images | Supported, rough edges | Production-ready, faster AOT |
| Virtual Threads | Opt-in via property | Default on Java 21+ |
| Observability | Micrometer + manual OTLP setup | Unified OTLP auto-configuration |
| Security | Spring Security 6.x | Spring Security 7 |
The jump from 3 to 4 is less disruptive than 2 to 3 was. There is no namespace migration (jakarta was already done in 3.0). The changes are mostly about modernization and removing accumulated deprecations.
For new projects: Yes, start with Spring Boot 4. There is no reason to begin a project on 3.x at this point. You get better defaults, cleaner APIs, and you avoid a future migration.
For existing production applications: Wait for 4.0.2 or 4.0.3. The initial GA releases always surface edge cases that the milestone and RC phases missed. Spring Boot 3.4.x is in active maintenance and will receive security patches through 2026.
For teams still on Spring Boot 2.7: You need a migration plan now. Spring Boot 2.7 reached end of commercial support. Jumping to 4.0 is possible, but you'll face every breaking change from 3.0 and 4.0 simultaneously. Consider a staged migration: 2.7 to 3.4 first, stabilize, then move to 4.0.
If you want a hands-on walkthrough of Spring Boot's core concepts before upgrading, the Spring Boot Master Class covers everything from dependency injection to production deployment.
Verify you are running Java 17 or later. Java 21 is recommended to take advantage of virtual threads.
java --version
Maven (pom.xml):
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>4.0.1</version>
</parent>
Gradle (build.gradle):
plugins {
id 'org.springframework.boot' version '4.0.1'
}
The Spring team maintains OpenRewrite recipes that automate most of the migration:
./mvnw -U org.openrewrite.maven:rewrite-maven-plugin:run \
-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-spring:LATEST \
-Drewrite.activeRecipes=org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_4,org.openrewrite.java.spring.boot4.UpgradeSpringBoot_4_0
This handles import changes, property renames, and deprecated API replacements.
After running the automated migration, compile your project and address remaining issues:
./mvnw clean compile
Common fixes include:
WebSecurityConfigurerAdapter with SecurityFilterChain bean definitionsRestTemplate usage to RestClient or declarative @HttpExchange interfaces@ConfigurationProperties classes to use constructor bindingRun your full test suite. Pay attention to integration tests that touch security configuration, database access, and HTTP client behavior - these are the areas most affected by the upgrade.
./mvnw test
If you deploy as GraalVM native images, rebuild and test:
./mvnw -Pnative native:compile
The AOT hints may have changed, so verify your application starts and responds correctly.
For a practical guide on building APIs with the framework, including patterns that carry forward into Spring Boot 4, check out Building APIs with Spring Boot.
| Version | Release Date | Java Baseline | Spring Framework | Status |
|---|---|---|---|---|
| 2.7 | May 2022 | Java 8 | 5.3 | End of OSS support |
| 3.0 | November 2022 | Java 17 | 6.0 | End of OSS support |
| 3.2 | November 2023 | Java 17 | 6.1 | End of OSS support |
| 3.4 | November 2024 | Java 17 | 6.2 | Active maintenance |
| 4.0 | November 2025 | Java 17 | 7.0 | Current GA |
The pattern is clear: major releases land every November, minor releases fill in between. The spring boot latest version 2026 is 4.0.x, with 4.1 expected around May 2026.
Spring Boot 4 is a solid, evolutionary release. It builds on the foundation that Spring Boot 3 established with Jakarta EE and adds meaningful improvements in developer experience, performance, and observability. The migration path is well-tooled, and the breaking changes are manageable if you were already on 3.x.
Start new projects on Spring Boot 4. Migrate existing apps on your own timeline, ideally after the first few patch releases stabilize things.
If you want to build your Spring Boot skills from the ground up - whether you are on version 3 or 4 - the Spring Boot Master Class gives you the complete picture.
Spring Boot 4.0 GA was released on November 20, 2025, shipping alongside Spring Framework 7.0. Milestone builds were available from May 2025.
Mostly. If your Spring Boot 3.4 application compiles without deprecation warnings, the upgrade is straightforward. The main breaking changes involve removed deprecated APIs, Spring Security 7 defaults, and the shift to JSpecify null-safety annotations. There is no namespace migration like the javax-to-jakarta change in 3.0.
No. Java 17 remains the minimum supported version. However, Java 21 or later is recommended to take advantage of virtual threads and other language improvements that Spring Boot 4 auto-configures.
RestTemplate is not removed, but its auto-configuration is now opt-in rather than automatic. The recommended replacements are RestClient for imperative code and the declarative @HttpExchange interface for cleaner API client definitions.
It is possible but not recommended. The 2.7-to-3.0 migration includes the javax-to-jakarta namespace change, which is the most disruptive breaking change in Spring's recent history. Migrating to 3.4 first lets you isolate that change, stabilize, and then make the smaller jump to 4.0.

Skip the generic recommendations. These 9 books changed how I write code, lead teams, and think about systems - from Clean Code to books most devs haven't heard of.

The exact skills, tools, and learning order to go from zero to hired as a Java full stack developer. Covers Spring Boot, React, databases, Docker, and what employers actually look for.

A step-by-step backend developer roadmap for 2026 focused on Java and Spring Boot. Covers everything from programming basics to system design, databases, APIs, DevOps, and landing your first job.
Join thousands of developers mastering in-demand skills with Amigoscode. Try it free today.