Translated from the latest news on Spring Boot’s official blog.

On behalf of the Spring Boot team and everyone involved, we would like to announce that Spring Boot 2.2.0 has been released and is now accessible from Spring Repo, Maven Central and Bintray. This release adds a number of new features and improvements. For complete updates and new and noteworthy features, see release notes.

New features in 2.2

Depend on the upgrade

Spring Boot 2.2 The following Spring dependencies have been upgraded to new versions:

  • Spring it 2.2
  • Spring Batch 4.2
  • Spring Data Moore
  • Spring Framework 5.2
  • Spring bases for 1.0
  • Spring Integration 5.2
  • Spring Kafka 2.3
  • Spring Security 5.2
  • Spring Session Corn

We also upgrade to the latest stable versions of other third-party libraries whenever possible. Some of the more notable upgrades to third-party dependencies in this release include:

  • Elasticsearch 6.7
  • Flyway 6.0
  • Jackson 2.10
  • JUnit 5.5
  • 1.3 Micrometer
  • Reactor Dysprosium
  • Solr 8.0

Performance improvement

As part of our ongoing efforts to improve performance, we have made some significant improvements on Spring Boot 2.2 and 2.1. Applications now launch faster and consume less memory. This is especially useful in environments with very tight memory constraints.

Lazy initialization

Global lazy initialization can now be enabled via the spring.main.lazy-initialization property to reduce startup time. Please note that there may be some costs associated with using this feature:

  • The processing of HTTP requests may take longer with any delayed initialization
  • Now, the time that normally doesn’t fail at startup will be delayed

See this blog post for a broader discussion of the new feature, as well as some guidance on when it should and should not be enabled.

13 supports Java

Starting with Spring Framework 5.2 support for Java 13, Spring Boot 2.2 now supports Java 13 as well, while remaining compatible with Java 11 and Java 8.

Support for immutable property binding

ConfigurationProperties now support construction-based bindings that allow classes with the @configurationproperties annotation to be immutable. The constructor-based binding @constructorBinding can be enabled by annotating an @ConfigurationProperties in a configuration class or one of its constructors. And @DefaultValue@DateTimeFormat can be used on the constructor arguments provided by the configuration property binding.

See the relevant section of the Reference documentation for more details.

RSocket support

Spring Boot also adds a new related component to the RSocket I introduced earlier: spring-boot-starter-rsocket. Spring Security’s Rsocket integration is also configured automatically when spring-security-rsocket is on the classpath. See the relevant section of the Reference documentation for more details.

Apply health indicator grouping

You can now group metrics for Spring Boot application health. If you are deploying your application to Kubernetes, a typical requirement is that you may need to group different health metrics to distinguish between things like “active” and “ready.”

Groups can be configured by configuring properties. Create a custom group with DataSource indicators only:

 management.endpoint.health.group.custom.include=dbCopy the code

The custom groups can then be invoked using endpoints /actuator/ Health /custom. See the updated reference documentation for more details.

Other changes

Many other changes and improvements are documented in the release notes. You’ll also find a list of unrecommended classes and methods that we plan to remove in the next release.

Follow our public id: Felordcn for more information

Personal blog: https://felord.cn