Skip to content

Spring Boot 3.4.0 M1 Release Notes

Stéphane Nicoll edited this page Jul 3, 2024 · 44 revisions

Spring Boot 3.4.0-M1 Release Notes

Upgrading from Spring Boot 3.3

Bean Validation of Configuration Properties

Previously, when a @ConfigurationProperties class annotated with @Validated was being validated using a Bean Validation implementation such as Hibernate Validator, validation of nested properties would be performed as they were bound, irrespective of the use of @Valid. In Spring Boot 3.4, validation now follows the behavior of the Bean Validation specification. Validation is performed from the @ConfigurationProperties-annoated class and only cascades down to nested properties where the corresponding field is annotated with @Valid.

When upgrading, inspect your @ConfigurationProperties classes with Bean Validation constraints. Add @Valid as necessary where you want the validation to cascade down to nested properties.

HtmlUnit 4.2

HtmlUnit has been upgraded to 4.2. With this upgrade comes a change in dependency coordinates from net.sourceforge.htmlunit:htmlunit to org.htmlunit:htmlunit and a change in package names from com.gargoylesoftware.htmlunit. to org.htmlunit.. When upgrading, update your build configuration and imports accordingly.

Selenium HtmlUnit 4.20

Selenium HtmlUnit has been updated to 4.20. With this upgrade comes a change in dependency coordinates from org.seleniumhq.selenium:htmlunit-driver to org.seleniumhq.selenium:htmlunit3-driver. When upgrading, update your build configuration accordingly.

Minimum Requirements Changes

Gradle

Gradle 7.5, 8.0, 8.1, and 8.2 are no longer supported. Gradle 7.x (7.6.4 or later) or Gradle 8.x (8.3 or later) is now required.

New and Noteworthy

Tip
Check the configuration changelog for a complete overview of the changes in configuration.

Observability improvements

The new property spring.application.group can be used to group applications together, e.g. if they all belong to some business unit or one bigger application arrangement. When this property is set, it’s also included in the log messages. This behavior can be controlled with the property logging.include-application.group. The application group is also automatically added to the OpenTelemetry Resource.

The new properties management.otlp.tracing.export.enabled, management.wavefront.tracing.export.enabled and management.zipkin.tracing.export.enabled can be used to enable or disable trace exporting more finely grained.

The new properties under management.otlp.logs can be used to auto-configure OpenTelemetry’s OtlpHttpLogRecordExporter and SdkLoggerProvider.

The ProcessInfoContributor now also shows memory info about heap and non-heap usage.

AssertJ support for MockMvc

Auto-configuration for MockMvcTester is provided when AssertJ is on the classpath. MockMvcTester lets you define the requests and the assertions using a fluent API. It can be injected anywhere MockMvc is.

For more details, check the dedicated section of the Spring Framework reference documentation.

Dependency Upgrades

Spring Boot 3.4.0-M1 moves to new versions of several Spring projects:

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

Miscellaneous

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

  • The new properties spring.docker.compose.start.arguments and spring.docker.compose.stop.arguments can be used to specify additional command line arguments passed to Docker Compose

  • You can now use a Customizer<Liquibase> bean to customize Liquibase before it is being used

  • The properties used to create a JCache CacheManager can now be customized by defining a JCachePropertiesCustomizer bean.

  • Spring Boot’s Testcontainers integration now supports org.testcontainers.kafka.KafkaContainer.

  • The RequestToViewNameTranslator used by Spring MVC can now be customized by defining a bean named viewNameTranslator.

  • Lettuce’s ClientOptions can now be customized using a LettuceClientOptionsBuilderCustomizer bean. For broader configuration of the whole LettuceClientConfiguration, continue to use LettuceClientConfigurationBuilderCustomizer.

  • The new customizer ProxyConnectionFactoryCustomizer can be used to customize a R2DBC ProxyConnectionFactory.

  • An audit event is now published if a Spring Security logout happens.

Deprecations in Spring Boot 3.4.0-M1

Clone this wiki locally