-
Notifications
You must be signed in to change notification settings - Fork 40.7k
Spring Boot 2.4.0 M4 Release Notes
Spring Boot 2.4 will no longer register the DefaultServlet
provided by your servlet container.
In most applications, it isn’t used since the Spring MVC’s DispatcherServlet
is the only servlet that’s required.
You can set server.servlet.register-default-servlet
to true
if you find you still need the default servlet.
By default, Undertow preserves the original request URL when a request is forwarded.
This release overrides the Undertow default to comply with the Servlet spec.
The previous Undertow default behavior can be restored by setting a property server.undertow.preserve-path-on-forward
to true
.
The upgrade to Flyway 7 includes some changes to callback ordering.
This will be a breaking change for anyone relying on registration order which we support via @Order
and Ordered
.
The DSL for the Spring Boot Gradle Plugin bootJar
task has been updated so that the mainClass
can be configured using a Property<String>
.
If you currently use mainClassName
, for example:
bootJar {
mainClassName 'com.example.ExampleApplication'
}
You should change it to mainClass
:
bootJar {
mainClass 'com.example.ExampleApplication'
}
The ConfigDataLocationResolver
and ConfigDataLocationLoader
interfaces introduced in M2 have been updated with this release.
If you have been experimenting with the new ConfigData
features you’ll need to adapt to the changes.
See Issue #23711 for more background.
The Docker registry authentication configuration supported by the Maven and Gradle plugins has been modified.
The docker.registry
configuration option has been replaced by docker.builderRegistry
and docker.publishRegistry
options to enable separate registries for builder images and published images.
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
FailureAnalizers will now be considered even if a ApplicationContext
was not created.
This allows them to also analyze any exceptions thrown during Environment
processing.
Note that any analyzer that implements BeanFactoryAware
or EnvironmentAware
will not be used unless the ApplicationContext
was created.
The bootBuildImage
Gradle task now puts all project modules dependencies in the "application" layer.
This means that if you have multiple project modules in your build, they will now all end up in the same layer.
You can also use includeProjectDependencies()
and excludeProjectDependencies()
in the DSL when customizing layers.
See the updated Gradle documentation for details.
The image builder used by the Maven plugin spring-boot:build-image
goal and Gradle plugin bootBuildImage
task by default has been upgraded to the latest Paketo images.
The Paketo image registry has been changed from Google Container Registry to Docker Hub for improved accessibility.
This release upgrades to Flyway 7 which brings some additional properties.
For the open source edition we’ve add the following spring.flyway
properties:
-
url
-
user
-
password
If you’re using the "teams" edition you can also make use of:
-
cherry-pick
-
jdbc-properties
-
oracle-kerberos-cache-file
-
oracle-kerberos-config-file
-
skip-executing-migrations
If you’re using Redis caching you can now expose cache statistics via Micrometer. Metrics logged include the number puts, gets and deletes as well has hits/misses. The number of pending requests and the lock wait duration are also recorded.
To enable the feature, set spring.cache.redis.enable-statustics
to true
.
-
The reference documentation now includes both
Properties
andYAML
for all configuration examples. -
RSocketServer’s fragment size can now be customized using the
spring.rsocket.fragment-size
property