It’s been two weeks since Spring Boot 2.1.0. RC1 was announced and now Spring Boot 2.1.0 is here! The release is available from repo.spring.io, Maven Central and Bintray.
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
DataSize support
A 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.
Actuator endpoints
There are two brand new Actuator endpoints Spring Boot 2.1:
/actuator/caches
provides information about the application’s cache managers/actuator/integrationgraph
provides 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
setConnectTimeout(int)
andsetReadTimeout(int)
have been deprecated in favor of similar methods that take aDuration
.- Methods used to set a data size using
int
have been deprecated and replaced with variants that take aDataSize
. management.endpoints.jmx.unique-names
is deprecated in favor ofspring.jmx.unique-names
- The
secure
attribute on@AutoConfigureMockMvc
has been deprecated in favor of using Spring Security’s@WithMockUser
annotation. RestTemplateBuilder.basicAuthorization
has been deprecated in favor ofbasicAuthentication
.REQUEST_WRAPPER_FILTER_MAX_ORDER
inAbstractFilterRegistrationBean
andFilterRegistrationBean
have been replaced byOrderedFilter.REQUEST_WRAPPER_FILTER_MAX_ORDER
.
We’ve just scratched the surface so make sure to read the release notes for the entire list of changes and improvements.
The post Spring Boot 2.1 brings Java 11 support and a bunch of new features and improvements appeared first on JAXenter.
Source : JAXenter