-
Notifications
You must be signed in to change notification settings - Fork 40.7k
Spring Boot 2.5.0 RC1 Release Notes
spring.datasource.
properties related to DataSource
initialization have been deprecated in favour of new spring.sql.init.
properties that can also be used to initialise an SQL database accessed via R2DBC.
The new script-based SQL database initialization does not support using separate credentials for schema (DDL) and data (DML) changes.
This reduces complexity and aligns its capabilities with Flyway and Liquibase.
If you require separate credentials for schema and data initialization, define your own org.springframework.jdbc.datasource.init.DataSourceInitializer
beans.
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
A /quartz
endpoint has been added to Actuator. It provides detailed information about Quartz jobs and triggers.
Please see the relevant section of the Actuator’s API documentation for further details.
Support for script-based initialization of an SQL database accessed via R2DBC has been added.
By default, scripts on the classpath named schema.sql
and data.sql
will be applied to the database automatically.
The initialization can be customized using the spring.sql.init.*
configuration properties. Please
see the reference documentation for further details.
Actuator will now generate Micrometer metrics for Spring Data repositories.
By default, metrics are named spring.data.repository.invocations
. To learn more, please see the relevant section of the reference documentation.
Aligning its capabilities with those of Spring MVC, @Timed
can now be used to manually enable timing of requests handled by WebFlux controllers and functional handlers.
To use manual timing, set management.metrics.web.server.request.autotime.enabled
to false
.
When using Actuator, metrics for Mongo’s connection pool and commands sent by the client are now generated automatically. To learn more about MongoDB metrics, please see the relevant section of the reference documentation.
All four embedded web containers now support HTTP/2 over TCP (h2c) without any manual customization. To enable h2c, set server.http2.enabled
is true
and leave server.ssl.enabled
set to false
(its default value).
Actuator’s health endpoint now shows the health of the targets of an AbstractRoutingDataSource
.
Each target DataSource
is named using its routing key.
As before, to ignore routing data sources in the health endpoint, set management.health.db.ignore-routing-data-sources
to true
.
Spring Boot’s Gradle plugin now supports Gradle 7.x. Gradle 6.8.x is also supported.
Spring Boot 2.5 moves to new versions of several Spring projects:
-
Spring Security 5.5.0-RC1
Numerous third-party dependencies have also been updated, some of the more noteworthy of which are the following:
-
Kotlin 1.5.0-RC
-
Elasticsearch 7.12
Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:
-
When Spring Security is on the classpath, configuration properties can now be bound to
RSAPublicKey
andRSAPrivateKey
. -
The RabbitMQ
ConnectionFactory
used by Spring AMQP can now be customized using aConnectionFactoryCustomizer
bean. -
Embedded database auto-configured can now be controlled using the new
spring.datasource.embedded-database-connection
configuration property. It can be set to any of the values ofEmbeddedDatabaseConnection
, includingnone
to disable embedded database auto-configured entirely. -
CloudPlatform
can now automatically detect Azure App Service. -
server.tomcat.keep-alive-timeout
can be used to configure how long Tomcat will wait for another request before closing a keep-alive connection. -
server.tomcat.max-keep-alive-requests
can be used to control the maximum number of requests that can be made on a keep-alive connection before it is closed. -
spring.webflux.session.cookie.same-site
can be used to configure WebFlux’s SameSite cookie policy. It is lax by default. -
Apache HttpClient 5 is now auto-configured for use with WebClient.
-
A new
ApplicationEnvironment
class has been introduced which should improve a small performance boost. -
You can now configure Netty memory using the
spring.netty.leak-detection
property.