Engineering
Releases
News and Events

Spring Boot 2.2.0

On behalf of the Spring Boot team and everyone that has contributed, I am delighted to announce that Spring Boot 2.2.0 has been released and is available now from repo.spring.io, Maven Central and Bintray. This release adds a significant number of new features and improvements. For full upgrade instructions and new and noteworthy features please see the release notes.

What’s new in 2.2

Dependency upgrades

Spring Boot 2.2 moves to new versions of several Spring projects:

  • Spring AMQP 2.2
  • Spring Batch 4.2
  • Spring Data Moore
  • Spring Framework 5.2
  • Spring HATEOAS 1.0
  • Spring Integration 5.2
  • Spring Kafka 2.3
  • Spring Security 5.2
  • Spring Session Corn

We’ve also upgraded to the latest stable releases of other third-party libraries wherever possible. Some of the more notable third-party dependency upgrades in this release include:

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

Performance improvements

As part of our ongoing efforts to improve performance, we’ve made some significant progress in Spring Boot 2.2 on top of those made in 2.1. Applications will now start even faster and consume less memory while they do so. This can be particularly beneficial in environments with very tight memory constraints.

Lazy initialization

It is now possible to enable global lazy initialization to reduce startup time via the spring.main.lazy-initialization property. Please note that using this feature does come 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

Please see this blog post for a broader discussion of the new feature and some guidance on when it should and should not be enabled.

Java 13 support

Following on from Spring Framework 5.2’s support for Java 13, Spring Boot 2.2 now also supports Java 13 while also remaining compatible with Java 11 and 8.

Immutable @ConfigurationProperties binding

Configuration properties now support constructor-based binding, which allows a @ConfigurationProperties-annotated class to be immutable. Constructor-based binding can be enabled by annotating a @ConfigurationProperties class or one of its constructors with @ConstructorBinding. Annotations such as @DefaultValue and @DateTimeFormat can be used on constructor parameters that are provided by configuration property binding.
Please see the relevant section of the reference documentation for further details.

RSocket Support

Extensive auto-configuration has been added for RSocket along with a new starter, spring-boot-starter-rsocket. Spring Security’s RSocket integration is also auto-configured when the spring-security-rsocket is on the classpath. Please see the relevant section of the reference documentation for further details.

Health indicator groups

It is now possible to organize health indicators into groups. A typical example, if you deploy your application to Kubernetes, is that you may want different groups of health indicators for your “liveness” and “readiness” probes.

Groups can be configured via configuration properties. The following creates a custom group with only the DataSource indicator:

management.endpoint.health.group.custom.include=db

The custom group can be invoked by hitting localhost:8080/actuator/health/custom. Check the updated reference documentation for more details.

Other changes

There’s a whole host of other changes and improvements that are documented in the release notes. You can also find a list of deprecated classes and methods that we plan to remove in the next version.

Thank you


We want to take this opportunity to again thank all our users and contributors. We’ve now had over 600 people submit code, and there have been over 23000 commits to the project.

If you’re interested in helping out, check out the “ideal for contribution” tag in the issue repository. If you have general questions, please ask at stackoverflow.com using the spring-boot tag or chat with the community on Gitter.

Project Page | GitHub | Issues | Documentation | Stack Overflow | Gitter

comments powered by Disqus