Spring Boot eases registry publishing pains as it gets more Kubernetes friendly

Microservice building framework Spring Boot 2.4 is ready for the masses, though some internal changes might mean more manual work than usual to get new enhancements working. 

The team behind Spring Boot, for example, reworked the way that application.properties and application.yml files are processed, changing the way external configurations are loaded to improve the software’s Kubernetes support. On the back of that, developers using profile-specific properties will have to update their setups according to the tips in a new migration guide or switch to legacy mode to avoid potential problems. 

On the plus side, the new processing led to additional capabilities such as spring.config.import, which imports configuration trees commonly used for providing key/value pairs in Kubernetes. To make sure this does not affect the representation of an item’s source, the Boot team added a getParent() method to the framework’s Origin interface which is meant to provide developers with a full origin chain.

Users who had trouble with cloud platforms that only accept configuration files without a file extension can import them now by giving Spring Boot information about the file’s content type. If it looks a lot like yaml, for example, square brackets with a .yaml inside should do the trick.

Another helpful addition is the option to directly publish images generated via Maven or Gradle into a Docker registry. Spring Boot now also allows the use of a private authenticated Docker registry for builder or run images when working with buildpack.

The spreading observability trend was evident in Spring Boot 2.4, which has been fitted with a startup actuator endpoint. Microservice developers can use this to track components that take especially long to start and optimise their services accordingly. The addition comes hot on the heels of the application startup tracking feature that was introduced in version 5.3 of the Spring Framework and is now also supported in Boot.

Spring Boot supports Java 15  as well as versions 11 and 8, and comes with a number of upgraded dependencies, allowing developers to make use of functionalities new in Spring Data 2020.0, Spring Batch 4.3, Spring Kafka 2.6, and more. A full list of changes can be found in the project repository.

Those familiar with the framework will have noticed that the update follows a new versioning scheme. Instead of the usual 2.4.RELEASE, the current release goes under the name of 2.4.0, so devs should make sure to update any automated processes relying on the old versioning pattern.