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.
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
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.
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.
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.
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
@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.
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.
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:
The custom group can be invoked by hitting localhost:8080/actuator/health/custom. Check the updated reference documentation for more details.
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.
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.