-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Spring Boot 2.7.0 M1 Release Notes
Test property sources added by @SpringBootTest using either the properties attribute or the @TestPropertySource annotation are now added above the command line property source. If you are in the unlikely situation of having a @SpringBootTest that uses both properties and args (and with the same property name), you may need to change things around.
Spring Boot 2.7 upgrades to Flyway 8.4 (from 8.0). Since the 8.0 release, Flyway’s support for a number of databases has been extracted into new modules:
-
flyway-firebird(Firebird) -
flyway-mysql(MariaDB and MySQL) -
flyway-sqlserver(SQL Server)
If you are using Flyway to manage the schema of one of the above databases, add a dependency on the appropriate new module.
Classes, methods and properties that were deprecated in Spring Boot 2.5 have been removed in this release. Please ensure that you aren’t calling deprecated methods before upgrading.
|
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
Spring Boot 2.7 ships support for the Spring GraphQL project with a new spring-boot-starter-graphql starter. You’ll find more information in the GraphQL section of the Spring Boot reference documentation.
A RabbitStreamTemplate is auto-configured if a stream name is set using the spring.rabbitmq.stream.name property.
A RabbitStreamTemplateConfigurer is provided, similar to RabbitTemplateConfigurer to customize additional instances whilst retaining auto-configuration.
The auto-configured Hazelcast embedded server now uses SpringManagerContext by default.
This makes it possible to inject Spring managed beans into objects instantiated by Hazelcast.
A HazelcastConfigCustomizer callback interface has also been introduced and can be used to further tune the Hazelcast server config.
An OsInfoContributor can expose some information about the Operating System the application is running on:
{
"os": {
"name": "Linux",
"version": "5.4.0-1051-gke",
"arch": "amd64"
}
}This new contributor is disabled by default.
It can be enabled using the management.info.os.enabled property.
The existing JavaInfoContributor has been improved to offer a dedicated section for the vendor information, including the vendor-specific version.
Rather than a top-level vendor simple attribute, it is now a dedicated object with name and version attributes:
{
"java": {
"vendor": {
"name": "Eclipse Adoptium",
"version": "Temurin-17.0.1+12"
},
"..."
}Note that not all vendors expose a java.vendor.version system property so the version attribute may be null.
An RSocket handler method can now inject the @Authenticated Principal:
@MessageMapping ("test")
Mono<String> hello (@Authenticated Principal p){
return Mono.just ("Hello, " + p.getName()) ;
}Spring Boot 2.7 moves to new versions of several Spring projects:
-
Spring Data 2021.2.0-M2
-
Spring Session 2021.2.0-M1
Numerous third-party dependencies have also been updated, some of the more noteworthy of which are the following:
-
Flyway 8.4
Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:
-
Kafka
idlePartitionEventIntervalcan be configured using thespring.kafka.listener.idle-partition-event-intervalproperty. -
KafkaTemplatetransactionIdPrefixproperty can be configured using thespring.kafka.template.transaction-id-prefixproperty. -
Netty
maxKeepAliveRequestscan be configured using theserver.netty.max-keep-alive-requestsproperty. -
@DataJdbcTestautomatically scans forAbstractJdbcConfigurationbeans. -
A
UserDetailsServicebean is no longer auto-configured when SAML 2.0 Login is being used. -
The transaction isolation level of Spring Batch can be configured using the
spring.batch.jdbc.isolation-level-for-createproperty. -
The filter used to record Spring MVC metrics can now be replaced by defining your own
FilterRegistrationBean<WebMvcMetricsFilter>bean. -
The ID of
DatabaseDriver.MARIADBhas changed frommysqltomariadb