-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Spring Boot 2.4.0 M3 Release Notes
Config locations specified via spring.config.import (introduced in 2.4.0-M2) and spring.config.location will no longer fail silently if the file or folder does not exist.
If you want to import a location, but you don’t mind skipping it if it cannot be found, you should now prefix it with optional:.
For example, spring.config.import=optional:configtree:/etc/config/myvolume will import /etc/config/myvolume as a config tree if the folder exists, and skip it if it does not.
If you want to treat all locations as optional you can set spring.config.on-location-not-found=ignore in SpringApplication.setDefaultProperties(…) or with a system/environment variable.
The low-level Elasticsearch RestClient bean will no longer be auto-configured by Spring Boot.
A RestHighLevelClient bean is still auto-configured.
Most users should not need to use the low-level client and should not be affected by this change.
|
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
Spring Boot 2.4 now fully supports (and is tested against) Java 15. The minimum supported version remains Java 8.
A new startup actuator endpoint is now available that shows information about your applications startup.
The endpoint can be 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.
The new actuator API is documented here.
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.
You can now create constructor bound @ConfigurationProperties beans for classes that do not contain any Spring annotations.
This can be useful if you define shared configuration classes that you don’t want to tie directly to Spring.
You can also use it to bind to third-party object (although we generally recommend that you only use @ConfigurationProperties with classes under your control)
To use the new feature, add a @ImportAsConfigurationPropertiesBean annotation to your @Configuration or @SpringApplication class.
The spring.config.import support introduced in M2 has been improved with a few tweaks:
-
Imports will now fail if the referenced file or folder does not exist (see "Upgrading" details above).
-
The
Originof an import now includes a full chain so you can exactly how it was imported. Theactuator/envandactuator/configpropsendpoints have been updated to show the new details. -
It’s now possible to import a file that has no file extension by providing a hint to Spring Boot about the content type. For example,
spring.config.import=/etc/myconfig[.yaml]will load/etc/myconfigas YAML. -
The
spring.profiles.includeproperty can be used again, although it cannot be combined withspring.config.activate.on-profile.
When generating runnable Spring Boot jars, empty starter dependencies will now be automatically removed. Since most starters only provide transitive dependencies, there is little point in packaging them in the final jar.
If you have your own starter POMs that contain no code, you can add a Spring-Boot-Jar-Type entry to its MANIFEST.MF with the value "dependencies-starter".
Spring Boot 2.4 will include Spring Framework 5.3, and this milestone upgrades to Spring Framework 5.3.0-RC1. Please refer to this blog post to learn more.
Spring Boot 2.4 will include version 2020.0 (code-named Ockham) of the Spring Data release train, and this milestone includes RC1. Please refer to this blog post to learn more.
Spring Boot 2.4 M3 moves to new versions of several Spring projects:
-
Reactor 2020.0.0-RC1
-
Spring AMQP 2.3.0-M3
-
Spring Batch 4.3.0-RC1
-
Spring Data 2020.0.0-RC1
-
Spring Framework 5.3.0-RC1
-
Spring Integration 5.4.0-M3
-
Spring Security 5.4.0
-
Spring Session 2020.0.0-RC1
Numerous third-party dependencies have also been updated, some of the more noteworthy of which are the following:
-
Undertow 2.2
-
Mockito 3.4
-
JUnit 5.7.0
-
RSocket 1.1.0-M2
-
A few methods from
ApplicationEnvironmentPreparedEvent,ApplicationStartingEventandSpringApplicationRunListenerhave been deprecated to supportBootstrapContext. -
The
BuildLogfor buildpack support has been updated to support more data (most users will not directly use this class)