:version: 3.2.0-RC1
:reference-docs: https://docs.spring.io/spring-boot/docs/{version}/reference/html/
:gradle-plugin-docs: https://docs.spring.io/spring-boot/docs/{version}/gradle-plugin/reference/htmlsingle
:maven-plugin-docs: https://docs.spring.io/spring-boot/docs/{version}/maven-plugin/reference/htmlsingle

= Spring Boot 3.2.0-RC1 Release Notes

For changes in earlier milestones, please refer to:

- link:Spring-Boot-3.2.0-M3-Release-Notes[v3.2.0-M3]
- link:Spring-Boot-3.2.0-M2-Release-Notes[v3.2.0-M2]
- link:Spring-Boot-3.2.0-M1-Release-Notes[v3.2.0-M1]


== Upgrading from Spring Boot 3.1



=== Auto-configured User Details Service
The auto-configured `InMemoryUserDetailsManager` now backs off when one or more of `spring-security-oauth2-client`, `spring-security-oauth2-resource-server`, and `spring-security-saml2-service-provider` is on the classpath.
Similarly, in reactive applications, the auto-configured `MapReactiveUserDetailsService` now backs off when one or more of `spring-security-oauth2-client` and `spring-security-oauth2-resource-server` is one the classpath.

If you are using one of the above dependencies yet still require an `InMemoryUserDetailsManager` or `MapReactiveUserDetailsService` in your application, define the required bean in your application.



=== Oracle UCP DataSource
The Oracle UCP DataSource no longer sets `validateConnectionOnBorrow` to `true` by default.
If you need to restore the old behavior you can set the `spring.datasource.oracleucp.validate-connection-on-borrow` application property to `true`.



=== Nested Jar Support
The underlying code that supports Spring Boot's "Uber Jar" loading has been rewritten now that we no longer need to support Java 8.
The updated code makes use of a new URL format which is more compliant with JDK expectations.
The previous URL format of `jar:file:/dir/myjar.jar:BOOT-INF/lib/nested.jar!/com/example/MyClass.class` has been replaced with `jar:nested:/dir/myjar.jar/!BOOT-INF/lib/nested.jar!/com/example/MyClass.class`.
The updated code also makes use of `java.lang.ref.Cleaner` (which was part of JDK 9) for resource management.

We have made every effort to ensure that, as much as possible, the new code is a transparent replacement for the previous implementation.
We do not anticipate that most users will even notice the change. One area where you may notice a change is if you were referring to one of the launcher classes directly as they have new names in the new default launcher:

[cols="1,1"]
|===
|New | Classic

| `org.springframework.boot.loader.launch.JarLauncher`
| `org.springframework.boot.loader.JarLauncher`

| `org.springframework.boot.loader.launch.PropertiesLauncher`
| `org.springframework.boot.loader.PropertiesLauncher`

| `org.springframework.boot.loader.launch.WarLauncher`
| `org.springframework.boot.loader.WarLauncher`
|===

If you do find issues with the new implementation, however, we have provided a fallback option that will allow you to use the old code.

For Gradle users you can set the `bootJar.loaderImplementation` to `org.springframework.boot.loader.tools.LoaderImplementation.CLASSIC`.
For example:

[source,gradle]
----
bootJar {
  loaderImplementation = org.springframework.boot.loader.tools.LoaderImplementation.CLASSIC
}
----

For Maven users, you can set the `<loaderImplementation>` tag on the `spring-boot-plugin` configuration to `CLASSIC`.
For example:

[source,xml]
----
<build>
  <plugins>
    <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>repackage</goal>
            </goals>
            <configuration>
              <loaderImplementation>CLASSIC</loaderImplementation>
            </configuration>
          </execution>
        </executions>
    </plugin>
  </plugins>
</build>
----

If you find any unexpected behavior with the new implementation, please raise a GitHub issue.



=== Minimum Requirements Changes
None.



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



=== Virtual threads



==== Keeping the JVM Alive
There's a new property called `spring.main.keep-alive`. When set to `true`, the JVM is kept alive, even if all other threads are virtual (or daemon) threads.



==== Spring for Apache Pulsar
When virtual threads are enabled, Spring for Apache Pulsar will now be configured to use them.
Specially the auto-configured `ConcurrentPulsarListenerContainerFactory` will use a `VirtualThreadTaskExector` for its consumer task executor. Similarly, the auto-configured `DefaultPulsarReaderContainerFactory` will use a `VirtualThreadTaskExecutor` for its reader task executor.



=== Jms Sessions
New properties have been introduced for configuring the sessions created by the auto-configured `JmsTemplate`:

- `spring.jms.template.session.acknowledge-mode`
- `spring.jms.template.session.transacted`

Similarly, a `spring.jms.listener.session.transacted` property has been introduced for the auto-configured `JmsMessageListenerContainer`.

To align with these new properties, please note that the existing `spring.jms.listener.acknowledge-mode` property has been deprecated and `spring.jms.listener.session.acknowledge-mode` has been introduced as a replacement.



=== Limited Message Body Size with RabbitMQ
Recent versions of the Java client for RabbitMQ limit the maximum size of the body of an inbound message to 64MB by default.
For the customization of this limit, the `spring.rabbitmq.max-inbound-message-body-size` configuration property has been introduced.



=== Connection validation on Oracle UCP datasources
The default for connection validation on Oracle UCP datasources has been removed.
Before 3.2.0-RC1 connection validation was enabled by default, this is no longer the case.
If you need connection validation, set the configuration property `spring.datasource.oracleucp.validate-connection-on-borrow` to `true`.



=== testAndDevelopmentOnly Gradle Configuration
In addition to `developmentOnly`, Spring Boot's Gradle plugin now also creates a `testAndDevelopmentOnly` configuration.
Unlike `developmentOnly`, dependencies in this new configuration are included in the test compile and runtime classpaths.
It is primarily intended for applications that are using {reference-docs}features.html#features.testing.testcontainers.at-development-time[Testcontainers at development time].



=== Observability improvements
You can now use Micrometer's https://micrometer.io/docs/concepts#_the_timed_annotation[`@Timed`], `@Counted`, `@NewSpan` and `@ContinueSpan` annotations.
The aspects for them are now auto-configured if you have AspectJ on the classpath.

There's a new configuration property named `spring.reactor.context-propagation`, which controls the context propagation in reactive pipelines.
To automatically propagate observations, trace ids and span ids in your reactive pipelines, set the property to `auto`.



=== SSL Bundles



==== Reloading
SSL bundles can now be automatically reloaded when the trust material changes.
A bundle must opt in to this functionality by settings its `reload-on-update` property to `true`.
The consumer of the bundle must also support reloading.

Consumers that support reloading are:

- Netty web server
- Tomcat web server

More information about reloading of SSL bundles can be found {reference-docs}features.html#features.ssl.reloading[in the reference documentation].



==== Support for RabbitMQ and Apache Kafka
RabbitMQ and Apache Kafka connections can now be configured to use SSL trust material from an SSL bundle with `spring.rabbitmq.ssl.bundle` and `spring.kafka.ssl.bundle` properties, as an alternative to providing trust material as Java keystore files using existing `spring.rabbitmq.ssl` and `spring.kafka.ssl` properties. 



=== Dependency Upgrades
Spring Boot 3.2.0-RC1 moves to new versions of several Spring projects:

- https://github.com/spring-projects/spring-amqp/releases/tag/v3.1.0-RC1[Spring AMQP 3.1.0-RC1]
- https://github.com/spring-projects/spring-authorization-server/releases/tag/1.2.0-RC1[Spring Authorization Server 1.2.0-RC1]
- https://github.com/spring-projects/spring-batch/releases/tag/v5.1.0-RC1[Spring Batch 5.1.0-RC1]
- https://github.com/spring-projects/spring-data-bom/releases/tag/2023.1.0-RC1[Spring Data 2023.1.0-RC1]
- https://github.com/spring-projects/spring-framework/releases/tag/v6.1.0-RC1[Spring Framework 6.1.0-RC1]
- Spring HATEOAS 2.2.0-RC1
- https://github.com/spring-projects/spring-integration/releases/tag/v6.2.0-RC1[Spring Integration 6.2.0-RC1]
- Spring LDAP 3.2.0-RC1
- https://github.com/spring-projects/spring-kafka/releases/tag/v3.1.0-RC1[Spring Kafka 3.1.0-RC1]
- https://github.com/spring-projects/spring-pulsar/releases/tag/1.0.0-RC1[Spring Pulsar 1.0.0-RC1]
- https://github.com/spring-projects/spring-security/releases/tag/6.2.0-RC2[Spring Security 6.2.0-RC1]
- https://github.com/spring-projects/spring-session/releases/tag/3.2.0-RC1[Spring Session 3.2.0-RC1]


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

- https://github.com/redis/jedis/releases/tag/v5.0.0[Jedis 5.0]
- https://www.confluent.io/en-gb/blog/introducing-apache-kafka-3-6/[Kafka 3.6]
- https://logging.apache.org/log4j/2.x/release-notes.html#release-notes-2-21-0[Log4j 2.21]
- https://github.com/micrometer-metrics/micrometer/releases/tag/v1.12.0-RC1[Micrometer 1.12.0-RC1]
- https://github.com/micrometer-metrics/tracing/releases/tag/v1.2.0-RC1[Micrometer Tracing 1.2.0-RC1]
- https://www.mongodb.com/community/forums/t/mongodb-java-driver-4-11-released/248657[Mongo Java Driver 4.11]
- https://square.github.io/okhttp/changelogs/changelog_4x/#version-4120[OkHttp 4.12]
- https://github.com/reactor/reactor/releases/tag/2023.0.0-RC1[Reactor 2023.0.0-RC1]
- https://www.selenium.dev/blog/2023/selenium-4-14-released/[Selenium 4.14]
- https://github.com/SeleniumHQ/htmlunit-driver/releases/tag/htmlunit3-driver-4.13.0[Selenium HtmlUnit 4.13]



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

* The `WebClient` based Zipkin sender now honors the timeouts set through the configuration properties.
* Any `TransactionExecutionListener` beans are now added to the auto-configured transaction manager.
* Transaction manager customization now applies to any type of `TransactionManager`, not just `PlatformTransactionManager`.
* https://github.com/awaitility/awaitility[Awaitility] (`org.awaitility:awaitility`) is now part of `spring-boot-starter-test`.
* Add property to verify keys when using PEM SSL bundles.
* Add support for CSP authentication when using Wavefront.
* The `restTemplateBuilderConfigurer` bean is no longer backing off on user-defined beans. If you had your own `restTemplateBuilderConfigurer` bean, please remove it. 
  See https://github.com/spring-projects/spring-boot/issues/36264[#36264] for details.
* The features declared in Jackson's `EnumFeature` and `JsonNodeFeature` can now be enabled and disabled using the configuration properties `spring.jackson.datatype.enum.*` and `spring.jackson.datatype.jsonnode.*` respectively.
* Additional build info properties can now have lazy values by using a `Provider`.
* When auto-configuring `MockMvc`, filters are now registered using the dispatcher types and init parameters from their registration bean.
* Testcontainers can now be initialized in parallel. For this, set `spring.testcontainers.beans.startup` to `parallel`.


== Deprecations in Spring Boot 3.2.0-RC1
* Configuration property `spring.jms.listener.concurrency` with replacement `spring.jms.listener.min-concurrency`.
* Configuration property `spring.jms.listener.acknowledge-mode` with replacement `spring.jms.listener.session.acknowledge-mode`.
* `PlatformTransactionManagerCustomizer` with replacement `TransactionManagerCustomizer`
* `TransactionManagerCustomizers(Collection<? extends PlatformTransactionManagerCustomizer<?>>)` with replacement `TransactionManagerCustomizers#of(Collection<? extends TransactionManagerCustomizer<?>>)`