Skip to content

Spring Boot 2.2.0 M2 Release Notes

Phillip Webb edited this page Nov 13, 2024 · 1 revision

Spring Boot 2.2.0 M2 Release Notes

For changes in earlier milestones, please refer to:

Upgrading from Spring Boot 2.2.0 M1

See instructions in the 2.2.0.M1 release notes for upgrading from Spring Boot 2.1.

Spring Framework 5.2

This release upgrades to Spring Framework 5.2 M1. Please refer to Spring Framework’s upgrade documentation for further details.

Elasticsearch

This release upgrades to Elasticsearch 6.7 which contains some breaking API changes. Please see the 6.5, 6.6 and 6.7 breaking changes pages for details.

As of Spring Boot 2.2.0, both Elasticsearch transport and Jest clients are deprecated in favor of other options, such as RestHighLevelClient. The reference docs on Elasticsearch support have been updated.

Hibernate Dialect

Spring Boot now lets Hibernate chose the dialect to use rather than applying a default dialect based on the detected database. If you had a dialect configured previously, you may want to remove your customization.

Configuration property scanning

The new support for @ConfigurationProperties scanning means that two beans may be created for a class that is annotated with both @Component and @ConfigurationProperties. In such cases, @Component should be removed. Please see the note at the end of the relevant section in the reference documentation for further details.

New and Noteworthy

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

@ConfigurationProperties scanning

Classes annotated with @ConfigurationProperties can now be found via classpath scanning as an alternative to using @EnableConfigurationProperties or @Component. If you use @SpringBootApplication, scanning is enabled by default for the package that contains the @SpringBootApplication-annotated class. Scanning can be enabled manually, and the scanned packages can be customized, using @ConfigurationPropertiesScan.

Immutable @ConfigurationProperties binding

Configuration properties now support constructor-based binding, which allows a @ConfigurationProperties-annotated class to be immutable. Please see the relevant section of the reference documentation for further details.

RSocket Server Support

A new Spring Boot starter has been added in this release, spring-boot-starter-rsocket. This starter brings the required dependencies for building an application with RSocket support.

For more on that, check out the reference docs on RSocket support.

Lazy Initialization Improvements

The support for lazy initialization that was introduced in 2.2.0.M1 has been improved. It is now possible to force a bean to be initialised eagerly by annotating its definition with @Lazy(false).

Performance Improvements

Startup time and memory usage have been reduced by making use of proxyBeanMethods=false in Spring Boot’s @Configuration classes. proxyBeanMethods is a new attribute on @Configuration introduced in Spring Framework 5.2 M1. proxyBeanMethods is also available as an attribute on @SpringBootApplication and @SpringBootConfiguration.

ApplicationContextRunner simple bean registration

The ApplicationContextRunner test utility now allows to register bean inline, see withBean for more details.

Dependency Upgrades

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

  • Artemis 2.7

  • Elasticsearch 6.7

  • Kafka 2.2

  • Hazelcast 3.12

  • Solr 8.0

Miscellaneous

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

  • Prometheus push gateway can now be configured using https

  • The actuator and gradle plugin documentation use the same styling as the main reference guide

Deprecations in Spring Boot 2.2.0 M2

Clone this wiki locally