backend

10 min read

Spring Boot 4: What's New, Release Date, and Should You Upgrade?

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.

Spring Boot 4: What's New, Release Date, and Should You Upgrade? thumbnail

Published By: Nelson Djalo | Date: March 24, 2026

Introduction

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.

Table of Contents

When Did Spring Boot 4 Release?

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:

  • May 2025 - Spring Boot 4.0 M1 (first milestone)
  • August 2025 - Spring Boot 4.0 M3
  • October 2025 - Spring Boot 4.0 RC1
  • November 2025 - Spring Boot 4.0 GA

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.

Key New Features in Spring Boot 4

Java 17 Baseline, Java 25 Support

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.

JSpecify Null-Safety Annotations

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.

Modular Codebase Architecture

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.

Declarative HTTP Clients

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.

Native Image Improvements

GraalVM native image compilation has been a focus since Spring Boot 3.0, but version 4 brings significant improvements:

  • Faster build times - AOT processing is roughly 30% faster compared to 3.4
  • Smaller binaries - better tree-shaking of unused auto-configurations
  • Broader library support - more third-party libraries ship GraalVM metadata out of the box

If you previously tried native images and hit walls with reflection configuration, it is worth retesting on 4.0.

Observability Tooling

Spring Boot 4 deepens its integration with Micrometer and OpenTelemetry. The auto-configuration for traces, metrics, and logs is more unified:

  • Single property namespace for configuring OTLP exporters
  • Built-in correlation between traces and log entries
  • Simplified Grafana and Prometheus setup through new starter dependencies

The spring-boot-starter-actuator now includes observability defaults that previously required manual bean registration.

Virtual Threads as Default-Ready

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.

Breaking Changes to Watch For

javax to jakarta (If You Haven't Already Migrated)

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.

Removed Deprecated APIs

Spring Boot 4 removed APIs that were deprecated in the 3.x line. The notable ones:

  • spring.config.use-legacy-processing property - removed entirely
  • WebSecurityConfigurerAdapter pattern - gone (use SecurityFilterChain beans)
  • RestTemplate auto-configuration moved to opt-in only - RestClient is the default
  • Older @ConfigurationProperties binding modes that relied on mutable setters without @ConstructorBinding

If your codebase compiled cleanly on Spring Boot 3.4 with zero deprecation warnings, you are in good shape.

Spring Security 7

Spring Boot 4 ships with Spring Security 7, which changes some defaults:

  • CSRF protection is now enabled for API endpoints by default (previously only for form-based apps)
  • The authorizeRequests() DSL is removed - use authorizeHttpRequests() exclusively
  • OAuth2 client configuration properties were restructured

Review your security configuration carefully before upgrading.

Spring Boot 4 vs Spring Boot 3 - What's Different

AreaSpring Boot 3.xSpring Boot 4.0
Minimum JavaJava 17Java 17 (supports up to Java 25)
Spring Framework6.x7.0
Null-safetySpring @NullableJSpecify annotations
HTTP ClientRestClient (new), RestTemplate (deprecated)Declarative @HttpExchange (stable)
Native ImagesSupported, rough edgesProduction-ready, faster AOT
Virtual ThreadsOpt-in via propertyDefault on Java 21+
ObservabilityMicrometer + manual OTLP setupUnified OTLP auto-configuration
SecuritySpring Security 6.xSpring 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.

Should You Upgrade Now?

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.

How to Migrate to Spring Boot 4

Step 1: Check Your Java Version

Verify you are running Java 17 or later. Java 21 is recommended to take advantage of virtual threads.

java --version

Step 2: Update Your Build File

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'
}

Step 3: Run OpenRewrite Migration Recipes

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.

Step 4: Fix Compilation Errors

After running the automated migration, compile your project and address remaining issues:

./mvnw clean compile

Common fixes include:

  • Replacing WebSecurityConfigurerAdapter with SecurityFilterChain bean definitions
  • Updating RestTemplate usage to RestClient or declarative @HttpExchange interfaces
  • Adjusting @ConfigurationProperties classes to use constructor binding

Step 5: Run Your Tests

Run 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

Step 6: Test Native Image Compilation (If Applicable)

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.

Spring Boot Version Timeline

VersionRelease DateJava BaselineSpring FrameworkStatus
2.7May 2022Java 85.3End of OSS support
3.0November 2022Java 176.0End of OSS support
3.2November 2023Java 176.1End of OSS support
3.4November 2024Java 176.2Active maintenance
4.0November 2025Java 177.0Current 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.

Conclusion

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.

FAQ

What is the Spring Boot 4 release date?

Spring Boot 4.0 GA was released on November 20, 2025, shipping alongside Spring Framework 7.0. Milestone builds were available from May 2025.

Is Spring Boot 4 backward compatible with Spring Boot 3?

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.

Do I need to upgrade from Java 17 to use Spring Boot 4?

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.

What happened to RestTemplate in Spring Boot 4?

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.

Should I skip Spring Boot 3 and go straight from 2.7 to 4.0?

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.

Your Career Transformation Starts Now

Join thousands of developers mastering in-demand skills with Amigoscode. Try it free today.