:boot-docs: https://docs.spring.io/spring-boot/4.0-SNAPSHOT
:framework-docs: https://docs.spring.io/spring-framework/reference/7.0
:framework-api-docs: https://docs.spring.io/spring-framework/docs/7.0.x-SNAPSHOT/javadoc-api/org/springframework

= Spring Boot 4.0.0-RC1 Release Notes

For changes in earlier milestones, please refer to:

- link:Spring-Boot-4.0.0-M3-Release-Notes[v4.0.0-M3]
- link:Spring-Boot-4.0.0-M2-Release-Notes[v4.0.0-M2]
- link:Spring-Boot-4.0.0-M1-Release-Notes[v4.0.0-M1]



== Upgrading from Spring Boot 3.5



=== Migration Guide

To help with upgrading, a https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Migration-Guide[migration guide] is available.



=== Fonts Added to Common Static Locations

If you use `PathRequest#toStaticResources`, please be advised that this release adds a location to `/fonts/+++**+++`.
With no change on your end, this path will have the same security settings as what you had previously configured.

If you don't want that location to be included, you can exclude it like any other location:

[,java]
----
pathRequest.toStaticResources().atCommonLocations().excluding(StaticResourceLocation.FONTS);
----



=== Classic Uber-Jar Loader Support

The classic uber-jar loader has been removed from this release.
You should remove any loader implementation configuration from your build file.

For maven this means removing the following:

```xml
<loaderImplementation>CLASSIC</loaderImplementation>
```

For Gradle, it will be lines similar to:

```groovy
loaderImplementation = org.springframework.boot.loader.tools.LoaderImplementation.CLASSIC
```


=== Optional Dependencies in Maven

Optional dependencies are no longer included in uber jars.
If you need them, you can use the configuration setting `<includeOptional>true</includeOptional>`



=== Jackson

The JSON-specific `spring.jackson.read.\*` and `spring.jackson.write.*` properties have moved beneath `spring.jackson.json.read` and `spring.jackson.json.write` respectively.

To help with migrating from Jackson 2 to Jackson 3, the `spring.jackson.use-jackson2-defaults` property has been introduced. When set to `true`, the auto-configured `JsonMapper` will have defaults that align as closely as possible with those of Jackson 2 in Spring Boot 3.x.

`@JsonComponent`, `@JsonMixin`, and related supporting classes have been renamed to clarify that they are specific to Jackson and are not, necessarily, limited to JSON. `@JsonComponent` is now `@JacksonComponent` and `@JsonMixin` is now `@JacksonMixin`. Supporting classes have been renamed in the same manner replacing `Json` with `Jackson`.



=== Spring Session

The properties for Spring Session Data Redis and Spring Session Data MongoDB have been renamed to reflect the dependencies on Spring Data Redis and Spring Data MongoDB respectively.
Properties that previously began with `spring.session.redis` now begin with `spring.session.data.redis`. Similarly, properties that previously began with `spring.session.mongodb` now begin with `spring.session.data.mongodb`.

=== `HttpMessageConverters` deprecation

This release deprecates Spring Boot's `HttpMessageConverters` because https://github.com/spring-projects/spring-framework/issues/33894[Spring Framework improved the converter configuration in the traditional stack]. `HttpMessageConverters` had several issues, including the fact that it conflates client and server converters.

If your application declares a custom `org.springframework.boot.http.converter.autoconfigure.HttpMessageConverters` bean, this is still supported but the type itself is deprecated. Instead, your application can declare one or more `ClientHttpMessageConvertersCustomizer` and `ServerHttpMessageConvertersCustomizer` that will let you customize converters in a flexible way.



=== Transaction Support

The `spring-boot-tx` module has been renamed to `spring-boot-transaction`.



=== Spock Integration

Spring Boot's Spock integration has been removed as Spock does not yet support Groovy 5.



=== Hibernate Dependency Management

The dependency management for Hibernate has been harmonized to take relocations into account:

* `hibernate-jpamodelgen` is replaced by `hibernate-processor`.
* `hibernate-proxool` and `hibernate-vibur` are no longer published.



=== Spring Pulsar Reactive

Following the decision of removing reactor support in Spring Pulsar, Spring Boot no longer manages the reactive Pulsar client.
Auto-configurations for Spring Pulsar Reactive has been removed as well.



=== Embedded Launch Scripts

Support for embedded launch scripts, used to create "fully executable" jar files, has been removed.
The support was specific to Unix-like operating systems and had a number of limitations, most notably conflicting with the {boot-docs}/reference/packaging/efficient.html[recommendations for efficient deployments].
If you still require similar functionality, we recommend looking at alternatives such as https://docs.gradle.org/current/userguide/application_plugin.html[Gradle's application plugin].


=== DevTools Live Reload Support

DevTools Live Reload support is now disabled by default.
If you want to use live reload please set `spring.devtools.livereload.enabled` to `true`.




=== Cyclone DX Gradle Plugin

The minimum supported version of the CycloneDX Gradle plugin is now 3.0.0.



=== Observability Test Auto-Configuration
The `@AutoConfigureObservability` annotation has been removed in favor of `@AutoConfigureMetrics` and `@AutoConfigureTracing` that provide a more fine-grained signal.
The infrastructure is provided by  `spring-boot-micrometer-metrics-test` and  `spring-boot-micrometer-tracing-test` respectively.



=== Minimum Requirements Changes

Spring Framework 7 raised the GraalVM native image baseline to 25.
Spring Boot now checks on startup if native image is supporting at least Java 25, and if not, refuses to start.



=== Testcontainers 2.0
This release upgrades to Testcontainers 2.0.
All modules are prefixed with `testcontainers-` and containers classes are relocated to a package matching the name of the module.

See https://github.com/testcontainers/testcontainers-java/releases/tag/2.0.0[the release notes] for more details.



== New and Noteworthy
TIP: Check link:Spring-Boot-4.0.0-RC1-Configuration-Changelog[the configuration changelog] for a complete overview of the changes in configuration.


=== RestTestClient

Support for the newly introduced {framework-docs}/testing/resttestclient.html[RestTestClient] has been added.

With a regular `@SpringBootTest` or when `@AutoConfigureMockMvc` is used, you can autowire a `RestTestClient` that operates on the underlying `MockMvc` instance.

For integration tests, i.e. `@SpringBootTest` with either a defined or random port, a `RestTestClient` can be injected to target the running server.



=== Redis Static Master/Replica

Auto-configuration for Static Master/Replica has been added.
This feature is only supported by Lettuce.

To use it, provide the list of static nodes using the new `spring.data.redis.masterreplica.nodes` property.



=== Redis Observability

The Redis auto-configuration has been improved to auto-configure `MicrometerTracing`, rather than `MicrometerCommandLatencyRecorder`.
The former operates on the Observation API and provides both metrics and spans.



=== Dependency Upgrades

Spring Boot 4.0.0-RC1 moves to new versions of several Spring projects:

* https://github.com/micrometer-metrics/micrometer/releases/tag/v1.16.0-RC1[Micrometer 1.16.0-RC1]
* https://github.com/micrometer-metrics/tracing/releases/tag/v1.6.0-RC1[Micrometer Tracing 1.6.0-RC1]
* https://github.com/reactor/reactor/releases/tag/2025.0.0-RC1[Reactor Bom 2025.0.0-RC1]
* https://github.com/spring-projects/spring-amqp/releases/tag/v4.0.0-RC1[Spring AMQP 4.0.0-RC1]
* https://github.com/spring-projects/spring-batch/releases/tag/v6.0.0-RC1[Spring Batch 6.0.0-RC1]
* https://github.com/spring-projects/spring-data-bom/releases/tag/2025.1.0-RC1[Spring Data Bom 2025.1.0-RC1]
* https://github.com/spring-projects/spring-framework/releases/tag/v7.0.0-RC2[Spring Framework 7.0.0-RC2]
* https://github.com/spring-projects/spring-graphql/releases/tag/v2.0.0-RC1[Spring GraphQL 2.0.0-RC1]
* https://github.com/spring-projects/spring-hateoas/releases/tag/3.0.0-RC1[Spring HATEOAS 3.0.0-RC1]
* https://github.com/spring-projects/spring-integration/releases/tag/v7.0.0-RC1[Spring Integration 7.0.0-RC1]
* https://github.com/spring-projects/spring-kafka/releases/tag/v4.0.0-RC1[Spring Kafka 4.0.0-RC1]
* https://github.com/spring-projects/spring-ldap/releases/tag/4.0.0-RC1[Spring LDAP 4.0.0-RC1]
* https://github.com/spring-projects/spring-pulsar/releases/tag/v2.0.0-RC1[Spring Pulsar 2.0.0-RC1]
* https://github.com/spring-projects/spring-restdocs/releases/tag/v4.0.0-RC1[Spring RESTDocs 4.0.0-RC1]
* https://github.com/spring-projects/spring-security/releases/tag/7.0.0-RC1[Spring Security 7.0.0-RC1]
* https://github.com/spring-projects/spring-session/releases/tag/4.0.0-RC1[Spring Session 4.0.0-RC1]
* https://github.com/spring-projects/spring-ws/releases/tag/v5.0.0-RC1[Spring WS 5.0.0-RC1]

Numerous third-party dependencies have also been updated, some of the more noteworthy of which are the following:

* https://activemq.apache.org/components/artemis/download/release-notes-2.43.0[Artemis 2.43]
* https://commons.apache.org/proper/commons-lang/changes.html#a3.19.0[Commons Lang3 3.19]
* Groovy 5.0
* https://github.com/h2database/h2database/releases/tag/version-2.4.240[H2 2.4]
* https://github.com/HtmlUnit/htmlunit/releases/tag/4.17.0[HtmlUnit 4.17]
* https://github.com/FasterXML/jackson/wiki/Jackson-Release-3.0.0[Jackson Bom 3.0]
* https://github.com/redis/jedis/releases/tag/v7.0.0[Jedis 7.0]
* https://junit.org/junit5/docs/6.0.0/release-notes[JUnit Jupiter 6.0]
* https://github.com/liquibase/liquibase/releases/tag/v5.0.0[Liquibase 5.0]
* https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.25.2[Log4j2 2.25]
* https://github.com/apache/maven-antrun-plugin/releases/tag/maven-antrun-plugin-3.2.0[Maven AntRun Plugin 3.2]
* https://github.com/apache/maven-dependency-plugin/releases/tag/maven-dependency-plugin-3.9.0[ Maven Dependency Plugin 3.9]
* https://github.com/apache/maven-javadoc-plugin/releases/tag/maven-javadoc-plugin-3.12.0[Maven Javadoc Plugin 3.12]
* https://github.com/mockito/mockito/releases/tag/v5.20.0[Mockito 5.20]
* https://github.com/neo4j/neo4j-java-driver/releases/tag/6.0.1[Neo4j Java Driver 6.0]
* https://github.com/open-telemetry/opentelemetry-java/releases/tag/v1.55.0[OpenTelemetry 1.55]
* https://github.com/r2dbc/r2dbc-h2/releases/tag/v1.1.0.RELEASE[R2DBC H2 1.1]
* https://github.com/pgjdbc/r2dbc-postgresql/releases/tag/v1.1.0.RELEASE[R2DBC Postgresql 1.1]
* https://github.com/rabbitmq/rabbitmq-java-client/releases/tag/v5.27.0[Rabbit AMQP Client 5.27]
* https://github.com/SeleniumHQ/selenium/releases/tag/selenium-4.37.0[Selenium 4.37]
* https://github.com/SeleniumHQ/htmlunit-driver/releases/tag/4.36.1[Selenium HtmlUnit 4.36]
* https://github.com/testcontainers/testcontainers-java/releases/tag/2.0.0[TestContainers 2.0]
* https://github.com/mojohaus/xml-maven-plugin/releases/tag/1.2.0[XML Maven Plugin 1.2]


=== Miscellaneous

Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:

* You can now set `Spring-Boot-Jar-Type` to `development-tool` in your `MANIFEST.MF` to exclude dependencies from uber jars.
* Amazon Web Services (AWS) Elastic Container Service (ECS) platform is now a recognized `CloudPlatform`.
* Support for Micrometer's `@ObservationKeyValue` has been added.
* JSpecify nullability annotations have been refined further.
* Public members from configurations imported by auto-configuration classes have been made package-private.
* HTML Unit `LocalHostWebClient` and `LocalHostWebConnectionHtmlUnitDriver` have been superseded by `UriBuilderFactoryWebClient` and `UriBuilderFactoryWebConnectionHtmlUnitDriver`
* A new configuration property can be used to control whether the Elasticsearch Client's sniffer is enabled.


== Deprecations in Spring Boot 4.0.0-RC1

* None
