Java framework: spring boot 2.4 extends the configuration

Java framework: spring boot 2.4 extends the configuration

The complement to the Java framework Spring for creating standalone applications Spring Boot is available in version 2.4.0 appeared. The release brings enhanced configuration file processing, allowing the import of configuration trees to improve interaction with cloud platforms. In addition, a new endpoint can be used to retrieve detailed information about the application’s startup behavior and publish Docker images directly to a Docker registry.

On the Java side, Spring Boot 2 is working.4 with JDK 15, but can still be used with Java 8 and Java 11. In the Spring ecosystem, the recently released Spring Framework 5 is.3 the basis, and in the other projects Spring Boot also offers a connection to the latest releases such as Spring Security and Spring Integration each in version 5.4 and Spring Data 2020.0.

Change tree

A new spring.config.import property can be used to import configuration trees, which are mainly found in the cloud environment, among others in the configuration for Kubernetes clusters. The key-value pairs are stored in separate files, where the name represents the key and the content represents the value.

As an indirect consequence, the current release processes the configuration files application.poperties and application.yml differently than the processors. Spring developers have modified the update logic when loading external configurations to include new features such as importing configurations via spring.config.import. For simple configuration files there is probably no need to change anything, and for more complex scenarios there is a migration guide available on GitHub.

Analysis of teething problems

New startup endpoint provides insight into application startup behavior. To help find spring beans that took longer than expected to launch. Startup tracking has been used since the most recent version 5.3 Part of the Spring Framework. The call of the end point is made, for example, via

$ curl ‘http:

Another new feature is the Origin interface, which represents the origin of an item and contains, for example, the file name and the corresponding row and column numbers for content loaded from a file. Spring Boot 2.4 introduces the getParent() method, which can be used to get a chain of sources. So love to spring for one.config.import loaded content, which has as source the imported file, as parent object the original file where the import statement can be found.

Registry for containers

Spring Boot 2.3 already had some additions for Docker on board, including the option to use cloud native buildpacks. The latest release extends the connection to registries: The plug-ins for Maven and Gradle offer the possibility to publish an image created with spring-boot:build-image under Maven or bootBuildImage under Gradle directly in a Docker registry as a respective build-goal or task.

Further innovations in Spring Boot 2.4, among others, for authenticating Docker images can be found on the Spring blog.

Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: