Spring Boot 2.1 brings Java 11 support and a bunch of new features and improvements
Spring Boot 2.1.0. RC1 was announced a couple of weeks ago and surprise, surprise: Spring Boot 2.1.0 has just been released. This release arrives with a significant number of new features and improvements in tow so let’s waste no more time, shall we?
Since this release arrives with a bunch of new features and improvements, we’re only going to cover some of the most important highlights. For full upgrade instructions and new and noteworthy features, check out the release notes. And don’t forget to read Andy Wilkinson’s blog post either!
Spring Boot 2.1: Highlights
Java 11 support
Good news! Spring Boot 2.1 remains compatible with Java 8 but now also supports Java 11. The team has “continuous integration configured to build and test Spring Boot against the latest Java 11 release,” according to the release notes.
Third-party library upgrades
Spring Boot 2.1 builds on and requires Spring Framework 5.1. They’ve upgraded to the latest stable releases of other third-party jars [wherever possible], as explained in the release notes.
The list of notable dependency upgrades in Spring Boot 2.1 includes:
- Tomcat 9
- Undertow 2
- Hibernate 5.3
- JUnit 5.2
- Micrometer 1.1
org.springframework.util.unit.DataSize property can be exposed if a property needs to express a size in bytes or similar convenient unit. Similar to the
Duration which became available with Spring Boot 2.0, the data size supports an easy format (i.e.
10MB for 10 megabytes) and metadata support.
It should also be noted that all relevant configuration properties have been updated to use the new type.
There are two brand new Actuator endpoints Spring Boot 2.1:
/actuator/cachesprovides information about the application’s cache managers
/actuator/integrationgraphprovides a graph representation of Spring Integration components
The health endpoint has also been improved to allow a request for the health of an individual component to be made.
Deprecations in Spring Boot 2.1
setReadTimeout(int)have been deprecated in favor of similar methods that take a
- Methods used to set a data size using
inthave been deprecated and replaced with variants that take a
management.endpoints.jmx.unique-namesis deprecated in favor of
@AutoConfigureMockMvchas been deprecated in favor of using Spring Security’s
RestTemplateBuilder.basicAuthorizationhas been deprecated in favor of
FilterRegistrationBeanhave been replaced by