days
-4
-3
hours
-1
-5
minutes
-2
-8
seconds
-3
-8
search
Now that's fast!

Spring Boot 2.1 brings Java 11 support and a bunch of new features and improvements

JAX Editorial Team
Spring Boot 2.1
© Shutterstock / Kunst Bilder

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?

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.ioMaven 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

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) and setReadTimeout(int) have been deprecated in favor of similar methods that take a Duration.
  • Methods used to set a data size using int have been deprecated and replaced with variants that take a DataSize.
  • management.endpoints.jmx.unique-names is deprecated in favor of spring.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 of basicAuthentication.
  • REQUEST_WRAPPER_FILTER_MAX_ORDER in AbstractFilterRegistrationBean and FilterRegistrationBean have been replaced by OrderedFilter.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.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of