-
Notifications
You must be signed in to change notification settings - Fork 41.3k
Spring Boot 4.0 Migration Guide
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 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.
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.
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.
Once you have reviewed the state of your project and its dependencies, upgrade to the latest maintenance release of Spring Boot 4.0.
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 AMQP |
|
Artemis |
|
Spring Batch |
|
Spring’s Caching Support |
|
Cassandra |
|
Cloud Foundry Support |
|
Couchbase |
|
Spring Data Cassandra |
|
Spring Data Couchbase |
|
Spring Data Elasticsearch |
|
Spring Data JDBC |
|
Spring Data JPA + Hibernate |
|
Spring Data LDAP |
|
Spring Data MonoDB |
|
Spring Data Neo4J |
|
Spring Data R2DBC |
|
Spring Data Redis |
|
Spring Data REST |
|
Elasticsearch |
|
Flyway |
|
Freemarker |
|
Spring GraphQL |
|
Groovy Templates |
|
GSON |
|
Spring HATEOAS |
|
Hazelcast |
|
Spring Integration |
|
Jackson |
|
JDBC |
|
Jersey |
|
Jetty |
|
JMS |
|
jOOQ |
|
JSONB |
|
Spring Kafka |
|
LDAP |
|
Liquibase |
|
|
|
MongoDB |
|
Mustache |
|
Neo4J |
|
Netty |
|
Open Telemetry |
|
Pulsar |
|
Quartz |
|
R2DBC |
|
Reactor |
|
Reactor Netty |
|
Spring’s |
|
RSocket |
|
Spring Security |
|
Spring Security OAuth Authorization Server |
|
Spring Security OAuth Client |
|
Spring Security OAuth Resource Server |
|
Spring Security SAML |
|
Sendgrid |
|
Spring Session MongoDB |
|
Spring Session Data Redis |
|
Spring Session Hazelcast |
|
Spring Session JDBC |
|
SQL Support |
|
Thymeleaf |
|
Tomcat |
|
Undertow |
|
Jakarta Validation |
|
Spring’s |
|
Spring WebFlux (Server side) |
|
Spring Web MVC |
|
Spring Webservices |
|
Websockets |
|
Zipkin |
|
If you prefer to not use “starter” POMs, you can instead declare direct module dependencies:
Technology | Dependency |
---|---|
ActiveMQ |
|
Spring AMQP |
|
Artemis |
|
Spring Batch |
|
Spring’s Caching Support |
|
Cassandra |
|
Cloud Foundry Support |
|
Couchbase |
|
Spring Data Cassandra |
|
Spring Data Couchbase |
|
Spring Data Elasticsearch |
|
Spring Data JDBC |
|
Spring Data JPA |
|
Spring Data LDAP |
|
Spring Data MonoDB |
|
Spring Data Neo4J |
|
Spring Data R2DBC |
|
Spring Data Redis |
|
Spring Data REST |
|
Elasticsearch |
|
Flyway |
|
Freemarker |
|
Spring GraphQL |
|
Groovy Templates |
|
GSON |
|
Spring HATEOAS |
|
Hazelcast |
|
Hibernate |
|
Spring Integration |
|
Jackson |
|
JDBC |
|
Jersey |
|
Jetty |
|
JMS |
|
jOOQ |
|
JPA |
|
JSONB |
|
Spring Kafka |
|
LDAP |
|
Liquibase |
|
|
|
MongoDB |
|
Mustache |
|
Neo4J |
|
Netty |
|
Open Telemetry |
|
Pulsar |
|
Quartz |
|
R2DBC |
|
Reactor |
|
Reactor Netty |
|
Spring’s |
|
RSocket |
|
Spring Security |
|
Spring Security OAuth Authorization Server |
|
Spring Security OAuth Client |
|
Spring Security OAuth Resource Server |
|
Spring Security SAML |
|
Sendgrid |
|
Spring Session MongoDB |
|
Spring Session Data Redis |
|
Spring Session Hazelcast |
|
Spring Session JDBC |
|
SQL Support |
|
Thymeleaf |
|
Tomcat |
|
Spring’s Transaction Support |
|
Undertow |
|
Jakarta Validation |
|
Spring’s |
|
Spring WebFlux (Server side) |
|
Spring Web MVC |
|
Spring Webservices |
|
Websockets |
|
Zipkin |
|