Skip to content

Upgrading org.springframework.boot:spring-boot-starter-data-redis 3 to 4

Breaking3.5.16 → 4.1.2Breaking46Security1Platform5Deprecated11New207Changed979Fixed465Other292

BreakingUpgrade verdict

46 breaking changes and 5 platform requirement changes and a security fix.

  • If your build uses Protobuf and gRPC together, the gRPC setup is no longer applied automatically; you must opt in explicitly.
  • The Jetty starter no longer pulls in an extra Jetty servlets library that was not used. If your code used classes from it, you must add it yourself.
  • Removes support for the deprecated layertools jar mode.
  • Removes support for deprecated Logback properties.
Top 5 of 63 that need code or config changes

org.springframework.boot:spring-boot-starter-data-redis publishes an official migration guide for version 4. It covers more than the release notes do.

A migration guide ↗

Adds org.springframework.boot:spring-boot-data-redis 4.1.2, org.springframework:spring-messaging 7.0.10.

Drops io.lettuce:lettuce-core, org.springframework.data:spring-data-redis.

Installs 48 packages in all (was 39).

Breaking46
Spring Boot's Gradle plugin no longer automatically configures gRPC when the Protobuf plugin is applied.
protobufgrpcprotoc-gen-grpc-java
Removes the unused dependency on org.eclipse.jetty.ee11:jetty-ee11-servlets from spring-boot-jetty.
org.eclipse.jetty.ee11:jetty-ee11-servletsspring-boot-jetty
Removes support for the deprecated layertools jar mode.
layertools
Removes support for deprecated Logback properties.
Logback
Removes the unnecessary and unused jetty-ee11-servlets dependency from spring-boot-jetty.
org.eclipse.jetty.ee11:jetty-ee11-servletsspring-boot-jetty
Removes support for Spring Pulsar Reactive.
Removes ConcurrentReferenceCachingMetadataReaderFactory.
ConcurrentReferenceCachingMetadataReaderFactory
Removes integration for REST Docs' REST Assured support until REST Assured supports Groovy 5.
Removes support for embedded jar launch scripts.
Removes support for Spring Session Data MongoDB.
Removes support for Spring Session Hazelcast.
Drops Spock until it supports Groovy 5.
Renames Jackson-specific Json… annotations and classes to Jackson….
Renames the spring-boot-tx module to spring-boot-transaction.
spring-boot-txspring-boot-transaction
Renames SharedObjectMapper to SharedJsonMapper.
SharedObjectMapperSharedJsonMapper
Removes the SQL and Reactor starters as they are only used transitively.
Renames Spring Session properties that depend on Spring Data.
Renames JsonMapper-specific properties to make clear they are JSON-specific.
JsonMapper
Removes Bitnami support.
Renames …DataAutoConfiguration to Data…AutoConfiguration.
Drops support for spring-boot-loader-classic.
spring-boot-loader-classic
Removes auto-configuration support for '@HttpServiceClient'.
@HttpServiceClient
Renames spring.mongodb.uuid-representation.
spring.mongodb.uuid-representation
Removes GridFs from MongoConnectionDetails.
MongoConnectionDetailsGridFs
Renames *DataProperties classes to Data*Properties.
*DataPropertiesData*Properties
Drops support for Jersey, at least until it supports JAX-RS 4 (Jakarta EE 11).
JerseyJAX-RS 4
Removes dependency management for Spring Retry in favor of spring-core's new retry support.
Spring Retryspring-core
Removes isImmutable and getPrefix from OriginLookup.
OriginLookup.isImmutable()OriginLookup.getPrefix()
Renames spring-boot-starter-aop to spring-boot-starter-aspectj.
spring-boot-starter-aopspring-boot-starter-aspectj
Renames MongoDB properties that do not require Spring Data MongoDB.
MongoDB
Drops support for Undertow because it is not Servlet 6.1 compatible.
Undertow
Drops Actuator endpoint parameter support for javax.annotations.NonNull.
javax.annotations.NonNull
Removes StreamBuilderFactoryBeanCustomizer in favor of Spring Kafka's StreamsBuilderFactoryBeanConfigurer.
StreamBuilderFactoryBeanCustomizerStreamsBuilderFactoryBeanConfigurer
Makes auto-configurations final and removes public members.
Drops support for Wavefront.
Wavefront
Removes APIs that were deprecated for removal in 4.0 or earlier.
Renames spring-boot-starter-kotlin-serialization to spring-boot-starter-kotlinx-serialization-json and its test starter accordingly.
spring-boot-starter-kotlin-serializationspring-boot-starter-kotlinx-serialization-jsonspring-boot-starter-kotlin-serialization-testspring-boot-starter-kotlinx-serialization-json-test
Using TestRestTemplate now requires a dependency on spring-boot-restclient.
TestRestTemplatespring-boot-restclient
Moves spring.jackson.datetime.<feature-name> to spring.jackson.datatype.datetime<feature-name>.
spring.jackson.datetime.<feature-name>spring.jackson.datatype.datetime<feature-name>
Makes all type exclude filters package-private.
Makes ConfigDataLocation.of non-nullable.
ConfigDataLocation.of
Makes SanitizableData.key non-nullable.
SanitizableData.key
Always uses mongodb rather than mongo in MongoDB-related configuration properties.
Updates Jackson support to require Jackson 3.
Jackson
Replaces @OptionalParameter with JSpecify's @Nullable.
@OptionalParameter@Nullable
Replaces ClientHttpRequestFactorySettings.Redirects with HttpRedirects.
ClientHttpRequestFactorySettings.RedirectsHttpRedirects
Security1
Applies HTML escaping to the timestamp attribute in the Whitelabel error page.
Platform5
Upgrades to jOOQ 3.20 and requires Java 21 to use it.
jOOQ
Updates Neo4j support to require Neo4j Java Driver 6.0.0.
Raises the minimum supported version of the CycloneDX Gradle Plugin to 3.0.0.
Raises the minimum supported version of Gradle to 8.14.
Gradle
Adds support for Gradle 9.
Gradle
Deprecated11
Deprecates SpringJtaPlatform, which should have been deprecated since 4.1.0-M3.
SpringJtaPlatform
Deprecates OpenTelemetry's ZipkinSpanExporter, with support to be removed in Spring Boot 4.2.
ZipkinSpanExporter
Deprecates LiveReload support for removal.
Deprecates RootUriTemplateHandler in favor of DefaultUriBuilderFactory.
RootUriTemplateHandlerDefaultUriBuilderFactory
Delays removal of Jackson 2 support until 4.3 at the earliest.
Deprecates Derby support since Apache Derby is retired.
Derby
Deprecates OpenTelemetry's ZipkinSpanExporter, with support to be removed in Spring Boot 4.2.
ZipkinSpanExporter
Delays removal of Jackson 2 support until 4.3 at the earliest.
Reintroduces the previous EnvironmentPostProcessor in deprecated form.
EnvironmentPostProcessor
Deprecates JUnit 4 integration.
Deprecates ANT_PATH_MATCHER.
ANT_PATH_MATCHER