Spring Boot 2.3 enhances Docker support with new features
Spring Boot version 2.3 is here and it includes a long list of dependency upgrades, an update for Spring Data, Docker support additions, new features, and more. See what’s new and find out how to upgrade to the latest version of Spring Boot.
Spring Boot is an open source framework based on Java. Originally developed by Pivotal, it helps users create stand-alone, production-grade Spring-based applications with minimal configuration.
The latest update is now available. Spring Boot 2.3 adds a few new noteworthy features, fixes some issues, updates dependencies, and includes improvements.
Spring Boot 2.3 upgrades a handful of projects and dependencies. It moves to the stable version of several third-party libraries.
These upgrades include:
- Spring HATEOAS 1.1
- Spring Integration 5.3
- Spring Kafka 2.5
- Spring Security 5.3
- Spring Session Dragonfruit
- Cassandra Driver 4.6
- Couchbase Client 3.0
- Elasticsearch 7.6
- Kafka 2.5
- Micrometer 1.5
- MongoDB 4.0
Be aware that with these upgrades comes a number of deprecations and backwards incompatible changes.
For instance, Cassandra v4 introduces two new customizers (
CqlSessionBuilderCustomizer ) to replace
The minimum requirements for running Spring Boot have been updated. Users now require either Gradle 6.3+ or Jetty 9.4.22+.
Docker support changes
A few additions to help Docker support have been added.
Spring Boot 2.3 adds support for building jar files with contents separated into layers for Maven and Gradle plugins.
From the changelog:
When you create a layered jar, the
spring-boot-jarmode-layertoolsjar will be added as a dependency to your jar by default (this can be disabled with build configuration). With this jar on the classpath, you can launch your application in a special mode which allows the bootstrap code to run something entirely different from your application, for example, something that extracts the layers.
Jetty, Reactor Netty, Tomcat, and Undertow all now support graceful shutdown when enabling server.shutdown=graceful with reactive and Servlet-based web apps.
With this feature, after shutdown, the web server will wait a grace period before beginning any new requests. It will wait for all active requests to complete.
Configure the grace period using
Spring Data Neumann GA
Now that Spring Data Neumann is generally available, it will ship with Spring Boot 2.3.
The new major GA release for Spring Data includes over 650 features, as well as numerous bug fixes.
The following are now deprecated with Spring Boot 2.3:
spring.http.properties moved to
SpringApplication#refresh(ApplicationContext)is now deprecated. Please use
ON_TRACE_PARAMhas been renamed
That’s not all that has been added and changed in the newest version. For more information about all the changes implemented in Spring Boot 2.3, view the release notes. Additionally, view the configuration changelog here.
Download the latest updates via Maven Central or from repo.spring.io/release/.
Read the update instructions and begin your upgrade to Spring Boot 2.3. Be aware of deprecations, removals, and version changes.
Spring Boot newcomers should first familiarize themselves with the quick start guide and learn how to create a basic “Hello World” endpoint. You will need a JDK and an IDE.