-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Spring Boot 2.4.0 RC1 Release Notes
Reflecting Spring Boot 2.4βs move to a 6-month release cadence, code deprecated in Spring Boot 2.3 will not be removed until Spring Boot 2.5.
The embedded database logic has been refined to consider a database as embedded only if it is in-memory. This change has two consequences if youβre using file-based persistence or server mode with H2, HSQL and Derby:
-
The
sa
username is no longer set. If you were relying on that behaviour, youβd need to setspring.datasource.username=sa
in your configuration. -
Such database wonβt be initialised on startup anymore as they are no longer considered as embedded. You can always tune this using
spring.datasource.initialization-mode
.
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
This release candidate upgrades Spring Framework to version 5.3. Please refer to this blog post to learn more.
This release candidate upgrades the Spring Data release train to version 2020.0 (code-named Ockham). Please refer to this blog post to learn more.
Properties have been added to support configuration of the web locale and resource locations with either Spring MVC or Spring WebFlux. The new properties are:
-
spring.web.locale
-
spring.web.locale-resolver
-
spring.web.resources.*
A new property has been added to support configuration of the actuators management endpoint with either the servlet or reactive web stack:
-
management.server.base-path
These Spring MVC and servlet specific properties have been deprecated in favor of the new properties that support either web stack:
-
spring.mvc.locale
-
spring.mvc.locale-resolver
-
spring.resources.*
-
management.server.servlet.context-path
Servlet @WebLister
classes are now registered in such a way that they may themselves register servlets and filters.
Earlier versions of Spring Boot registered them using a call to javax.servlet.Registration.Dynamic
.
This meant that the following section of Servlet specification (4.4) applied:
If the ServletContext passed to the ServletContextListenerβs contextInitialized method where the ServletContextListener was neither declared in web.xml or web-fragment.xml nor annotated with @WebListener then an UnsupportedOperationException MUST be thrown for all the methods defined in ServletContext for programmatic configuration of servlets, filters and listeners.
As of Spring Boot 2.4, we no longer use dynamic registration and so itβs safe to call event.getServletContext().addServlet(β¦β)
and event.getServletContext.addFilter(β¦β)
from a ServletContextListener.contextInitialized
method.
When importing configuration from a config tree using spring.config.import: configtree:β¦β
, wildcards can now be used to import multiple config trees from the same parent folder.
Please refer to the external configuration documentation for more details.
Properties loaded from config trees now have trailing newline characters trimmed by default.
The spring-boot:build-image
Maven goal 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.
The XML schema has also been updated to allow the layer to be customized using new <includeModuleDependencies/>
and <excludeModuleDependencies/>
elements.
See the updated Maven documentation for details.
Properties have been added to allow configuration of a SAML2 relying party registrationβs decryption credentials and Assertion Consumer Service (ACS). The properties are under the following headings:
Logging properties that are specific to Logback have been renamed to reflect the fact that they are Logback-specific. The previous names have been deprecated.
The following Spring Boot properties have been changed:
-
logging.pattern.rolling-file-name
βlogging.logback.rollingpolicy.file-name-pattern
-
logging.file.clean-history-on-start
βlogging.logback.rollingpolicy.clean-history-on-start
-
logging.file.max-size
βlogging.logback.rollingpolicy.max-file-size
-
logging.file.total-size-cap
βlogging.logback.rollingpolicy.total-size-cap
-
logging.file.max-history
βlogging.logback.rollingpolicy.max-history
As have the system environment properties that they map to:
-
ROLLING_FILE_NAME_PATTERN
βLOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN
-
LOG_FILE_CLEAN_HISTORY_ON_START
βLOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START
-
LOG_FILE_MAX_SIZE
βLOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE
-
LOG_FILE_TOTAL_SIZE_CAP
βLOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP
-
LOG_FILE_MAX_HISTORY
βLOGBACK_ROLLINGPOLICY_MAX_HISTORY
-
The charsets used to by Logback and Log4j logging can now be configured using the properties
logging.charset.console
andlogging.charset.file
. -
Gradleβs configuration cache is supported when using Gradle 6.7 or later to build a Spring Boot application.
Spring Boot 2.4.0 RC1 moves to new versions of several Spring projects:
-
Spring AMQP 2.3.0
-
Spring Batch 4.3.0
-
Spring Data 2020.0.0
-
Spring Framework 5.3.0
-
Spring HATEOAS 1.2.0
-
Spring Integration 5.4.0
-
Spring Session 2020.0.0
Numerous third-party dependencies have also been updated, some of the more noteworthy of which are the following:
-
AssertJ 3.18.0
-
Elasticsearch 7.9.3
-
Flyway 7.1.1
-
Micrometer 1.6.0
-
Mockito 3.6.0
-
MongoDB 4.1.1
-
Reactor 2020.0.0