Skip to content

Spring Boot 4.1.0 M1 Release Notes

Phillip Webb edited this page Jan 22, 2026 · 30 revisions

Spring Boot 4.1.0-M1 Release Notes

Upgrading from Spring Boot 4.0

Deprecations from Spring Boot 4.0

Classes, methods and properties that were deprecated in Spring Boot 4.0 have been removed in this release. Please ensure that you aren’t calling deprecated methods before upgrading.

Minimum Requirements Changes

jOOQ

The supported version of jOOQ is now 3.20 which requires Java 21 or later.

Deprecated Derby Support

The Apache Derby project team has recently announced that the project has been retired. As a result, the integration in Spring Boot has been deprecated. If you are still using Derby, consider migrating to H2 or HSQL.

Layertools Support

The deprecated layertools jar mode has been removed in this release. If you were still using it, please move to tools that provides the same features (and more).

Skip Tests and AOT Processing

You can no longer rely on passing -DskipTests to a maven command to skip AOT processing of tests. The Spring Boot Maven Plugin now only reacts to the maven.test.skip property for consistency with other core plugins.

New and Noteworthy

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

Jackson

General reading and writing features that are common across multiple formats (CBOR, JSON, and XML) can now be auto-configured using spring.jackson.read. and spring.jackson.write. properties respectively.

Embedded LDAP

Auto-configuration of an embedded LDAP server now supports SSL (LDAPS). To enable SSL, configure an SSL bundle using the spring.ldap.embedded.ssl.bundle property.

SimpleMessageListenerContainer Support

The JMS support has been improved to provide a configurer for SimpleJmsMessageListener that is similar to the existing DefaultJmsListenerContainerFactoryConfigurer. The simple implementation may be more suitable in certain scenarios, check the Spring Framework Reference Guide for more details.

Restoration of Spock Support

This release reintroduces Spock support since we now have a Spock 2.4 release that support Groovy 5.

Observability

Context Propagation of Async methods

Context can be automatically propagated to methods running on a separate thread using @Async. See the Reference Guide for more details.

Auto-configured Conventions

A number of improvements have been made to support for observation conventions:

  • KafkaListenerObservationConvention beans are now automatically applied to the Kafka container factory.

  • KafkaTemplateObservationConvention beans are now automatically applied to the KafkaTemplate

  • RabbitListenerObservationConvention, RabbitTemplateObservationConvention, RabbitStreamListenerObservationConvention and RabbitStreamTemplateObservationConvention beans are now automatically configured on the Spring AMQP components

Improvements to meter conventions have also been made:

  • Any JvmMemoryMeterConventions bean is applied to the auto-configured JvmMemoryMetrics

  • Any JvmThreadMeterConventions bean is applied to the auto-configured JvmThreadMetrics

  • Any JvmClassLoadingMeterConventions bean is applied to the auto-configured ClassLoaderMetrics

  • Any JvmCpuMeterConventions bean is applied to the auto-configured ProcessorMetrics

bootBuildImage

The Gradle plugin’s bootBuildImage task now supports specifying environment variables on the command line using --environment. To specify multiple environment variables, use --environment multiple times. If an environment variable is configured both on the command line and in a build script, the value of the command line takes precedence.

Dependency Upgrades

Spring Boot 4.0.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:

  • AssertJ Assert implementations make use of @CheckReturnValue when applicable.

  • Add a failure analyzer that provides more details when Testcontainers cannot find a suitable Docker environment.

  • EntityManagerFactoryBuilder can now add PersistenceUnitPostProcessor instances rather than just setting them.

  • Mustache support consistently uses Charset instead of the String equivalent.

  • Auto-configuration for Spring Data REST supports a new spring.data.rest.return-body-on-delete property.

  • The web servers' temporary directories are now deleted when the context is closed.

  • Beans defined by MockRestServiceServiceAutoConfiguration are now @ConditionalOnMissingBean, making them easier to replace if needed.

  • A new @AutoConfigureWebServer test annotation has been added allowing you to add the embedded web server factory bean for tests to use.

Deprecations in Spring Boot 4.1.0-M1

  • org.springframework.boot.jdbc.DatabaseDriver.DERBY

  • org.springframework.boot.jdbc.EmbeddedDatabaseConnection.DERBY

Clone this wiki locally