Upgrading org.springframework.boot:spring-boot-starter-test 3 to 4
Breaking3.5.16 → 4.1.2Breaking7Security2Platform1Deprecated8New313Changed937Fixed466Other272
BreakingUpgrade verdict
7 breaking changes and a platform requirement change and 2 security fixes.
In plain terms
- If your project uses Protobuf and gRPC with Gradle, the gRPC setup is no longer applied automatically. You must opt in explicitly.
- A library that Spring Boot's Jetty support used to pull in automatically is no longer included. If your own code uses classes from it, you must add it yourself.
- Removes support for the deprecated layertools jar mode.
- Removes support for deprecated Logback properties.
Must act Top 5 of 18 that need code or config changes
org.springframework.boot:spring-boot-starter-test publishes an official migration guide for version 4. It covers more than the release notes do.
A migration guide ↗Installs 49 packages in all (was 48).
What you must change
Breaking7
Spring Boot's Gradle plugin no longer automatically configures gRPC when the Protobuf plugin is applied.
protobufgrpcprotoc-gen-grpc-javaRemoves the unused dependency on org.eclipse.jetty.ee11:jetty-ee11-servlets from spring-boot-jetty.
spring-boot-jettyorg.eclipse.jetty.ee11:jetty-ee11-servletsRemoves support for the deprecated layertools jar mode.
layertoolsRemoves support for deprecated Logback properties.
LogbackRemoves the unused dependency on org.eclipse.jetty.ee11:jetty-ee11-servlets from spring-boot-jetty.
org.eclipse.jetty.ee11:jetty-ee11-servletsspring-boot-jettyRenames spring-boot-starter-kotlin-serialization to spring-boot-starter-kotlinx-serialization-json and its test starter to spring-boot-starter-kotlinx-serialization-json-test.
spring-boot-starter-kotlin-serializationspring-boot-starter-kotlinx-serialization-jsonspring-boot-starter-kotlin-serialization-testspring-boot-starter-kotlinx-serialization-json-testUsing TestRestTemplate now requires a dependency on spring-boot-restclient.
TestRestTemplatespring-boot-restclientSecurity2
Applies HTML escaping to the timestamp attribute in the Whitelabel error page.
Applies HTML escaping to the timestamp attribute in the Whitelabel error page.
Platform1
Upgrades to jOOQ 3.20 and requires Java 21 to use it.
jOOQDeprecations to plan for
Deprecated8
SpringJtaPlatform is now deprecated as of 4.1.0-M3.
SpringJtaPlatformDeprecates OpenTelemetry's ZipkinSpanExporter, with support to be removed in Spring Boot 4.2.
ZipkinSpanExporterDeprecates LiveReload support for removal.
Deprecates RootUriTemplateHandler in favor of DefaultUriBuilderFactory.
RootUriTemplateHandlerDefaultUriBuilderFactoryDelays removal of Jackson 2 support until 4.3 at the earliest.
Deprecates Derby support since Apache Derby is retired.
DerbyDeprecates OpenTelemetry's ZipkinSpanExporter, with support to be removed in Spring Boot 4.2.
ZipkinSpanExporterDelays removal of Jackson 2 support until 4.3 at the earliest.