Skip to content

Spring Boot 4.0 Migration Guide

Phillip Webb edited this page Jul 24, 2025 · 5 revisions

This document is meant to help you migrate your application to Spring Boot 4.0.

Note
This is a preview draft of the migration guide. It will be completed when Spring Boot 4.0.0 is released.

Before You Start

Upgrade to the Latest 3.5.x Version

Before you start the upgrade, make sure to upgrade to the latest available 3.5.x version. This will make sure that you are building against the most recent dependencies of that line.

Please take time to review any calls you might be making to deprecated methods as these will be removed in Spring Boot 4.0.

Review Dependencies

The move to Spring Boot 4 will upgrade a number of dependencies and might require work on your end. You can review dependency management for 3.5.x with dependency management for 4.0.x to asses how your project is affected.

Review System Requirements

Spring Boot 4.0 requires Java 17 or later. Using the latest LTS release of Java is encouraged.

Spring Boot application can also be developed using Kotlin where v2.2 or later must be used.

If you manage dependencies directly, you also need to ensure that you use Spring Framework 7.x.

Review Deprecations from Spring Boot 3.x

Classes, methods and properties that were deprecated in Spring Boot 3.x have been removed in this release. Please ensure that you aren’t calling deprecated methods before upgrading.

Upgrade to Spring Boot 4

Once you have reviewed the state of your project and its dependencies, upgrade to the latest maintenance release of Spring Boot 4.0.

Module Dependencies

Spring Boot 4.0 has a new modular design and now ships smaller focused modules rather than several large jars. If your application uses Spring Boot “starter” POMs, most of your dependencies should be correct and your application will work as before.

You may, however, face issues if you use a technology that previous had no “starter” POMs. You will also need to make dependency modifications if your current application doesn’t use Spring Boot “starter” POMs.

The following table shows the “starter” POM you should be using to support a specific technology:

Technology Dependency

ActiveMQ

spring-boot-starter-activemq

Spring AMQP

spring-boot-starter-amqp

Artemis

spring-boot-starter-artemis

Spring Batch

spring-boot-starter-batch

Spring’s Caching Support

spring-boot-starter-cache

Cassandra

spring-boot-starter-cassandra

Cloud Foundry Support

spring-boot-starter-cloudfoundry

Couchbase

spring-boot-starter-couchbase

Spring Data Cassandra

spring-boot-starter-data-cassandra or spring-boot-starter-data-cassandra-reactive

Spring Data Couchbase

spring-boot-starter-data-couchbase or spring-boot-starter-data-couchbase-reactive

Spring Data Elasticsearch

spring-boot-starter-data-elasticsearch

Spring Data JDBC

spring-boot-starter-data-jdbc

Spring Data JPA + Hibernate

spring-boot-starter-data-jpa

Spring Data LDAP

spring-boot-starter-data-ldap

Spring Data MonoDB

spring-boot-starter-data-mongodb or spring-boot-starter-data-mongodb-reactive

Spring Data Neo4J

spring-boot-starter-data-neo4j

Spring Data R2DBC

spring-boot-starter-data-r2dbc

Spring Data Redis

spring-boot-starter-data-redis or spring-boot-starter-data-redis-reactive

Spring Data REST

spring-boot-starter-data-rest

Elasticsearch

spring-boot-starter-elasticsearch`

Flyway

spring-boot-starter-flyway

Freemarker

spring-boot-starter-freemarker

Spring GraphQL

spring-boot-starter-graphql

Groovy Templates

spring-boot-starter-groovy-templates

GSON

spring-boot-starter-gson

Spring HATEOAS

spring-boot-starter-hateoas

Hazelcast

spring-boot-starter-hazelcast

Spring Integration

spring-boot-starter-integration

Jackson

spring-boot-starter-jackson

JDBC

spring-boot-starter-jdbc

Jersey

spring-boot-starter-jersey

Jetty

spring-boot-starter-jetty

JMS

spring-boot-starter-jms

jOOQ

spring-boot-starter-jooq

JSONB

spring-boot-starter-jsonb

Spring Kafka

spring-boot-starter-kafka

LDAP

spring-boot-starter-ldap

Liquibase

spring-boot-starter-liquibase

Mail

spring-boot-starter-mail

MongoDB

spring-boot-starter-mongodb

Mustache

spring-boot-starter-mustache

Neo4J

spring-boot-starter-neo4j

Netty

spring-boot-starter-netty

Open Telemetry

spring-boot-starter-opentelemetry

Pulsar

spring-boot-starter-pulsar or spring-boot-starter-pulsar-reactive

Quartz

spring-boot-starter-quartz

R2DBC

spring-boot-starter-r2dbc

Reactor

spring-boot-starter-reactor

Reactor Netty

spring-boot-starter-reactor-netty

Spring’s RestClient and RestTemplate

spring-boot-starter-restclient

RSocket

spring-boot-starter-rsocket

Spring Security

spring-boot-starter-security

Spring Security OAuth Authorization Server

spring-boot-starter-security-oauth2-authorization-server

Spring Security OAuth Client

spring-boot-starter-security-oauth2-client

Spring Security OAuth Resource Server

spring-boot-starter-security-oauth2-resource-server

Spring Security SAML

spring-boot-starter-security-saml2

Sendgrid

spring-boot-starter-sendgrid

Spring Session MongoDB

spring-boot-starter-session-data-mongodb

Spring Session Data Redis

spring-boot-starter-session-data-redis

Spring Session Hazelcast

spring-boot-starter-session-hazelcast

Spring Session JDBC

spring-boot-starter-session-jdbc

SQL Support

spring-boot-starter-sql

Thymeleaf

spring-boot-starter-thymeleaf

Tomcat

spring-boot-starter-tomcat

Undertow

spring-boot-starter-undertow

Jakarta Validation

spring-boot-starter-validation

Spring’s WebClient

spring-boot-starter-webclient

Spring WebFlux (Server side)

spring-boot-starter-webflux

Spring Web MVC

spring-boot-starter-webmvc

Spring Webservices

spring-boot-starter-webservices

Websockets

spring-boot-starter-websocket

Zipkin

spring-boot-starter-zipkin

If you prefer to not use “starter” POMs, you can instead declare direct module dependencies:

Technology Dependency

ActiveMQ

spring-boot-activemq

Spring AMQP

spring-boot-amqp

Artemis

spring-boot-artemis

Spring Batch

spring-boot-batch

Spring’s Caching Support

spring-boot-cache

Cassandra

spring-boot-cassandra

Cloud Foundry Support

spring-boot-cloudfoundry

Couchbase

spring-boot-couchbase

Spring Data Cassandra

spring-boot-data-cassandra

Spring Data Couchbase

spring-boot-data-couchbase

Spring Data Elasticsearch

spring-boot-data-elasticsearch

Spring Data JDBC

spring-boot-data-jdbc

Spring Data JPA

spring-boot-data-jpa

Spring Data LDAP

spring-boot-data-ldap

Spring Data MonoDB

spring-boot-data-mongodb

Spring Data Neo4J

spring-boot-data-neo4j

Spring Data R2DBC

spring-boot-data-r2dbc

Spring Data Redis

spring-boot-data-redis

Spring Data REST

spring-boot-data-rest

Elasticsearch

spring-boot-elasticsearch`

Flyway

spring-boot-flyway

Freemarker

spring-boot-freemarker

Spring GraphQL

spring-boot-graphql

Groovy Templates

spring-boot-groovy-templates

GSON

spring-boot-gson

Spring HATEOAS

spring-boot-hateoas

Hazelcast

spring-boot-hazelcast

Hibernate

spring-boot-hibernate

Spring Integration

spring-boot-integration

Jackson

spring-boot-jackson

JDBC

spring-boot-jdbc

Jersey

spring-boot-jersey

Jetty

spring-boot-jetty

JMS

spring-boot-jms

jOOQ

spring-boot-jooq

JPA

spring-boot-jpa

JSONB

spring-boot-jsonb

Spring Kafka

spring-boot-kafka

LDAP

spring-boot-ldap

Liquibase

spring-boot-liquibase

Mail

spring-boot-mail

MongoDB

spring-boot-mongodb

Mustache

spring-boot-mustache

Neo4J

spring-boot-neo4j

Netty

spring-boot-netty

Open Telemetry

spring-boot-opentelemetry

Pulsar

spring-boot-pulsar

Quartz

spring-boot-quartz

R2DBC

spring-boot-r2dbc

Reactor

spring-boot-reactor

Reactor Netty

spring-boot-reactor-netty

Spring’s RestClient and RestTemplate

spring-boot-restclient

RSocket

spring-boot-rsocket

Spring Security

spring-boot-security

Spring Security OAuth Authorization Server

spring-boot-security-oauth2-authorization-server

Spring Security OAuth Client

spring-boot-security-oauth2-client

Spring Security OAuth Resource Server

spring-boot-security-oauth2-resource-server

Spring Security SAML

spring-boot-security-saml2

Sendgrid

spring-boot-sendgrid

Spring Session MongoDB

spring-boot-session-data-mongodb

Spring Session Data Redis

spring-boot-session-data-redis

Spring Session Hazelcast

spring-boot-session-hazelcast

Spring Session JDBC

spring-boot-session-jdbc

SQL Support

spring-boot-sql

Thymeleaf

spring-boot-thymeleaf

Tomcat

spring-boot-tomcat

Spring’s Transaction Support

spring-boot-tx

Undertow

spring-boot-undertow

Jakarta Validation

spring-boot-validation

Spring’s WebClient

spring-boot-webclient

Spring WebFlux (Server side)

spring-boot-webflux

Spring Web MVC

spring-boot-webmvc

Spring Webservices

spring-boot-webservices

Websockets

spring-boot-websocket

Zipkin

spring-boot-zipkin

Clone this wiki locally