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.
Spring Boot 2.4 has improved the way that
application.yml files are processed. If you only have a simple
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.
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 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 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/configprops actuator endpoints.
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.
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.
Spring Boot 2.4 supports Java 15 while also remaining compatible with Java 11 and 8.
Spring Boot 2.4 moves to new versions of several Spring projects:
- Spring AMQP 2.3
- Spring Batch 4.3
- Spring Data 2020.0
- Spring Framework 5.3
- Spring HATEOAS 1.2
- Spring Integration 5.4
- Spring Kafka 2.6
- Spring Retry 1.3
- Spring Security 5.4
- Spring Session 2020.0
We’ve also upgraded to the latest stable releases of other third-party libraries wherever possible. Please see the release notes for details.
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.
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.