Spring Boot 2.4.0 available now

Releases | Andy Wilkinson | November 12, 2020 | ...

On behalf of the Spring Boot team and everyone that has contributed, I am pleased to announce that Spring Boot 2.4.0 has been released and is available from Maven Central. 2.4.0 is the first generally available Spring Boot release that uses the new versioning scheme. Please note that the version is 2.4.0 rather than 2.4.0.RELEASE that you may have expected based on previous releases.

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.

What's new in 2.4

Config File Processing (application properties and YAML files)

Spring Boot 2.4 has improved the way that application.properties and application.yml files are processed. If you only have a simple application.properties or application.yml file, your upgrade should be seamless. If, however, you’ve have a more complex setup (with profile-specific properties, or profile activation properties) you may need to make some changes if you want to use the new features.

Volume Mounted Config Directory Trees

A new spring.config.import property can be used to import configuration trees that are commonly used with Kubernetes. A configuration tree is an alternative way of providing key/value pairs. Each pair is declared in its own file, with the filename forming the property key, and the file contents providing the value.

For a complete example, see the updated reference documentation.

Startup Endpoint

A new startup actuator endpoint is now available that shows information about your applications startup. The endpoint can help you identify beans that are taking longer than expected to start.

This work builds on the application startup tracking feature that was recently added to Spring Framwork 5.3. You can read more about the feature in the Spring Framework reference documentation.

Origin Chains

The Origin interface has been updated with a new getParent() method. This allows us to provide a full origin chain that can show exactly where an item originated from.

For example, you might use spring.config.import in your application.properties to import a second file. The Origin of properties loaded from this second file will have a parent that points back to the original import declaration.

You can try this yourself by looking at the output of the actuator/env or actuator/configprops actuator endpoints.

Docker/Buildpack Support

Publishing Images

The Maven plugin's spring-boot:build-image goal and the Gradle plugin's bootBuildImage task now have the ability to publish the generated image to a Docker registry. See the Maven and Gradle plugin documentation for more details on configuring the plugins for publishing images.

Authentication

When using Spring Boot’s buildpack support, you can now use a private authenticated Docker registry for your builder or run image. Both username/password and token based authentication are supported.

The Maven and Gradle documentation has been updated to show the new configuration.

Java 15 support

Spring Boot 2.4 supports Java 15 while also remaining compatible with Java 11 and 8.

Dependency upgrades

Spring Boot 2.4 moves to new versions of several Spring projects:

We’ve also upgraded to the latest stable releases of other third-party libraries wherever possible. Please see the release notes for details.

Other changes

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.

Thank you

We want to take this opportunity to again thank all our users and contributors. We've now had over 760 people submit code, and there have been over 29000 commits to the project.

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.

Project Page | GitHub | Issues | Documentation | Stack Overflow | Gitter

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all