:boot-docs: https://docs.spring.io/spring-boot/4.1-SNAPSHOT
:framework-docs: https://docs.spring.io/spring-framework/reference/7.0.x-SNAPSHOT
:framework-api-docs: https://docs.spring.io/spring-framework/docs/7.0.x-SNAPSHOT/javadoc-api/org/springframework

= 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 https://db.apache.org/derby/[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 link:Spring-Boot-4.1.0-M1-Configuration-Changelog[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 {framework-docs}/integration/jms/using.html#jms-mdp[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 {boot-docs}/reference/actuator/observability.html#actuator.observability.context-propagation[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:

* https://github.com/micrometer-metrics/micrometer/releases/tag/v1.17.0-M1[Micrometer 1.17.0-M1]
* https://github.com/micrometer-metrics/tracing/releases/tag/v1.7.0-M2[Micrometer Tracing 1.7.0-M2]
* https://github.com/spring-projects/spring-amqp/releases/tag/v4.1.0-M1[Spring AMQP 4.1.0-M1]
* https://github.com/spring-projects/spring-integration/releases/tag/v7.1.0-M1[Spring Integration 7.1.0-M1]
* https://github.com/spring-projects/spring-security/releases/tag/7.1.0-M1[Spring Security 7.1.0-M1]

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

* https://activemq.apache.org/components/classic/download/classic-06-02-00[ActiveMQ 6.2]
* https://activemq.apache.org/components/artemis/download/release-notes-2.44.0[Artemis 2.44]
* https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.18.3[Byte Buddy 1.18]
* https://commons.apache.org/proper/commons-codec/changes.html#a1.20.0[Commons Codec 1.20]
* https://commons.apache.org/proper/commons-dbcp/changes-report.html#a2.14.0[Commons DBCP2 2.14]
* https://commons.apache.org/proper/commons-lang/changes.html#a3.20.0[Commons Lang3 3.20]
* Commons Pool2 2.13.1
* https://documentation.red-gate.com/flyway/release-notes-and-older-versions/release-notes-for-flyway-engine[Flyway 11.20]
* https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.10.0[Kotlinx Serialization 1.10]
* https://in.relation.to/2025/11/07/hibernate-validator-9-1-0-Final/[Hibernate Validator 9.1]
* https://github.com/HtmlUnit/htmlunit/releases/tag/4.21.0[HtmlUnit 4.21]
* HttpClient5 5.6
* HttpCore5 5.4
* https://github.com/JetBrains/kotlin/releases/tag/v2.3.0[Kotlin 2.3]
* https://github.com/apache/maven-assembly-plugin/releases/tag/maven-assembly-plugin-3.8.0[Maven Assembly Plugin 3.8]
* https://github.com/apache/maven-jar-plugin/releases/tag/maven-jar-plugin-3.5.0[Maven Jar Plugin 3.5]
* https://github.com/apache/maven-resources-plugin/releases/tag/maven-resources-plugin-3.4.0[Maven Resources Plugin 3.4]
* https://github.com/apache/maven-source-plugin/releases/tag/maven-source-plugin-3.4.0[Maven Source Plugin 3.4]
* https://github.com/apache/maven-war-plugin/releases/tag/maven-war-plugin-3.5.1[Maven War Plugin 3.5]
* https://github.com/mockito/mockito/releases/tag/v5.21.0[Mockito 5.21]
* https://github.com/open-telemetry/opentelemetry-java/releases/tag/v1.57.0[OpenTelemetry 1.57]
* Oracle Database 23.26
* Pooled JMS 3.2
* https://github.com/rabbitmq/rabbitmq-java-client/releases/tag/v5.28.0[Rabbit AMQP Client 5.28]
* https://github.com/rabbitmq/rabbitmq-stream-java-client/releases/tag/v1.4.0[Rabbit Stream Client 1.4]
* https://github.com/SeleniumHQ/selenium/releases/tag/selenium-4.40.0[Selenium 4.40]
* https://github.com/SeleniumHQ/htmlunit-driver/releases/tag/4.40.0[Selenium HtmlUnit 4.40]
* https://github.com/xerial/sqlite-jdbc/releases/tag/3.51.1.0[SQLite JDBC 3.51]
* https://github.com/mojohaus/versions/releases/tag/2.20.1[Versions Maven Plugin 2.20]
* https://github.com/xmlunit/xmlunit/releases/tag/v2.11.0[XmlUnit2 2.11]



=== 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`
