Skip to content

Spring Boot 3.2.0 RC1 Release Notes

Phillip Webb edited this page Oct 19, 2023 · 14 revisions

Spring Boot 3.2.0-RC1 Release Notes

For changes in earlier milestones, please refer to:

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.

Minimum Requirements Changes

None.

New and Noteworthy

Tip
Check 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 Testcontainers at development time.

Observability improvements

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

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 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:

TODO

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

TODO

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.

  • 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 #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.

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<?>>)

Clone this wiki locally