Spring Boot 4.0 migration assistance. Use when upgrading Spring Boot from 3.x to 4.0, including: (1) Java 17+ requirement, (2) Jakarta EE 11 / Servlet 6.1, (3) Spring Framework 7.x, (4) Undertow removed, (5) Pulsar Reactive removed, (6) embedded launch scripts removed, (7) Spring Session Hazelcast/MongoDB restructured, (8) Spock integration removed, (9) new modular starters structure, (10) Classic Starter POMs for migration. Triggered by: Spring Boot 4.0 migration, upgrade spring boot 4, spring boot 4 breaking changes.
| Area | Change |
|---|---|
| Java | 17+ required |
| Kotlin | 2.2+ required |
| GraalVM | 25+ required |
| EE | Jakarta EE 11 |
| Servlet | 6.1 baseline |
| Spring Framework |
| 7.x |
| Undertow | Removed (incompatible with Servlet 6.1) |
| Pulsar Reactive | Removed (reactor support dropped) |
| Embedded Scripts | Removed (fully executable jars) |
| Spock | Removed (Groovy 5 not supported) |
| Spring Session | Hazelcast/MongoDB now separate projects |
Spring Boot 4 requires Servlet 6.1, which Undertow does not yet support. Undertow starter and embedded server support have been dropped.
Following the decision to remove reactor support in Spring Pulsar, reactive Pulsar client management has been removed.
Support for "fully executable" jar embedded launch scripts has been removed. Use uber jars with Spring Boot's build plugins instead.
Spring Boot's Spock integration has been removed as Spock does not yet support Groovy 5.
spring-boot-{technology}spring-boot-starter-{technology}org.springframework.boot.{technology}spring-boot-test-{technology}spring-boot-starter-test-{technology}For existing applications wanting quick migration, "Classic Starter POMs" provide pre-4.0 style setup:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-classic-starter</artifactId>
</dependency>
spring-boot-starter-web-mvc (was web)spring-boot-starter-webfluxspring-boot-starter-webservicesspring-boot-starter-freemarkerspring-boot-starter-groovy-templatesspring-boot-starter-mustachespring-boot-starter-thymeleafspring-boot-starter-data-cassandraspring-boot-starter-data-couchbasespring-boot-starter-data-elasticsearchspring-boot-starter-data-jdbcspring-boot-starter-data-jpaspring-boot-starter-data-ldapspring-boot-starter-data-mongodbspring-boot-starter-data-neo4jspring-boot-starter-data-r2dbcspring-boot-starter-data-redisspring-boot-starter-data-restspring-boot-starter-jdbcspring-boot-starter-jooqspring-boot-starter-flywayspring-boot-starter-liquibasespring-boot-starter-artemisspring-boot-starter-amqpspring-boot-starter-kafkaspring-boot-starter-pulsarspring-boot-starter-rsocketspring-boot-starter-securityspring-boot-starter-oauth2-authorization-serverspring-boot-starter-oauth2-clientspring-boot-starter-oauth2-resource-serverspring-boot-starter-samlspring-boot-starter-actuatorspring-boot-starter-micrometerspring-boot-starter-opentelemetryspring-boot-starter-zipkinspring-boot-starter-websocketspring-boot-starter-cachespring-boot-starter-hazelcastspring-boot-starter-mailspring-boot-starter-quartzspring-boot-starter-validationspring-boot-starter-batchAdd to help migrate properties:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-properties-migrator</artifactId>
<scope>runtime</scope>
</dependency>
Or for Gradle:
runtimeOnly("org.springframework.boot:spring-boot-properties-migrator")
Remove after migration complete.
For complete list of starters, module mappings, and detailed migration patterns, see:
→ references/migration-guide.md