-
Notifications
You must be signed in to change notification settings - Fork 40.7k
Spring Boot 2.2.0 M1 Release Notes
Classes, methods and properties that were deprecated in Spring Boot 2.1 have been removed in this release. Please ensure that you aren’t calling deprecated methods before upgrading.
As of #16090, JMX is not enabled by default anymore. This feature can be enabled with the configuration property spring.jmx.enabled=true
. If you’re using IDE features to administer your applications, you may want to enable that flag there as well.
Where possible, we have moved from Java EE dependencies with a javax.
group ID to the equivalent Jakarta EE dependencies with a jakarta.
group ID in Spring Boot’s starters. Dependency management for the Jakarta EE API dependencies has been added alongside the existing dependency management for the Java EE API dependencies. The dependency management for the Java EE API dependencies will be removed in the future and all users are encouraged to move to the Jakarta EE API dependencies.
As part of the Java EE to Jakarta EE migration, two dependencies have changed artifact ID in their latest maintenance releases. com.sun.mail:javax.mail
is now com.sun.mail:jakarta.mail
and org.glassfish:javax.el
is now org.glassfish:jakarta.el
. In the unlikely event that you were using either of these dependencies directly, please update your pom.xml
or build.gradle
accordingly.
This release upgrades to AssertJ 3.12 that contains a breaking API change for assertions related to Iterator
. Please see the AssertJ release notes for details.
This release upgrades to Spring HATEOAS 1.0 M1 which contains some breaking API changes. Please see the blog post that announced the release for details and a script that can be used to ease the migration.
logging.file.max-size
and logging.file.total-size-cap
are now using the standard DataSize
type in replacement of the proprietary FileSize
type. If you are using any of those properties, make sure to align to the standard format.
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
Several performance improvements have been added in this release:
-
Time taken to bind large numbers of configuration properties has been significantly reduced
-
As Spring Boot fully prepares a
PersistenceUnit
by scanning JPA entities, Hibernate’s own entity scanning has been disabled as it is redundant -
Injection points in auto-configurations have been refined to only apply when a bean has to be created
-
Beans related to Actuator endpoints are now only created if the endpoint is both enabled and exposed (via JMX or HTTP)
It is now possible to enable global lazy initialization to reduce startup time via the spring.main.lazy-initialization
property. Please note that using that feature comes at a cost:
-
Handling of HTTP requests may take longer while any deferred initialisation occurs
-
Failures that would normally occur at startup will now not occur until later
Spring Boot 2.2 will ship with Spring Data Moore and this release upgrades to Spring Data Moore M2. Please see the blog posts announcing Spring Data Moore M1 and Spring Data Moore M2 to learn about what’s new.
The behaviour on shutdown for both the auto-configured TaskExecutor
and TaskScheduler
is now configurable, see the spring.task.execution.shutdown
and spring.task.scheduling.shutdown
namespaces for more details.
ConditionalOnCloudPlatform
now detects if the application is running on Kubernetes.
SpringBootTest
allows to specify application arguments that will trigger the creation of an ApplicationArguments
bean.
Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:
-
loadOnStartup
can be configured if you’re wrapping aServlet
as an actuator endpoint. -
Flyway bootstrap failures are covered by a dedicated
FailureAnalyzer
-
The
MessageConverter
for Kafka batch listeners is properly auto-configured. -
Add support for Jaybird 4 (
jdbc:firebird
prefix). -
Add opt-in support for Neo4j-OGM native types.
-
Client-side HTTP-metrics have an
outcome
tag. -
Numerous upgrades of third-party dependencies