-
Notifications
You must be signed in to change notification settings - Fork 40.7k
Spring Boot 3.2.0 RC1 Release Notes
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.
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
.
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:
New | Classic |
---|---|
|
|
|
|
|
|
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:
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:
<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.
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
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.
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.
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.
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.
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
.
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 Testcontainers at development time.
You can now use Micrometer’s @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 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 in the reference documentation.
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.
Spring Boot 3.2.0-RC1 moves to new versions of several Spring projects:
-
Spring HATEOAS 2.2.0-RC1
-
Spring LDAP 3.2.0-RC1
Numerous third-party dependencies have also been updated, some of the more noteworthy of which are the following:
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 justPlatformTransactionManager
. -
Awaitility (
org.awaitility:awaitility
) is now part ofspring-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 ownrestTemplateBuilderConfigurer
bean, please remove it. See #36264 for details. -
The features declared in Jackson’s
EnumFeature
andJsonNodeFeature
can now be enabled and disabled using the configuration propertiesspring.jackson.datatype.enum.
andspring.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
toparallel
.
-
Configuration property
spring.jms.listener.concurrency
with replacementspring.jms.listener.min-concurrency
. -
Configuration property
spring.jms.listener.acknowledge-mode
with replacementspring.jms.listener.session.acknowledge-mode
. -
PlatformTransactionManagerCustomizer
with replacementTransactionManagerCustomizer
-
TransactionManagerCustomizers(Collection<? extends PlatformTransactionManagerCustomizer<?>>)
with replacementTransactionManagerCustomizers#of(Collection<? extends TransactionManagerCustomizer<?>>)