You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of Spring Framework 6.0, the trailing slash matching configuration option has been deprecated and its default value set to false. This means that previously, the following controller would match both "GET /some/greeting" and "GET /some/greeting/":
@RestController
public class MyController {
@GetMapping("/some/greeting")
public String greeting {
return "Hello";
}
}
Developers should instead configure explicit redirects/rewrites through a proxy, a Servlet/web filter, or even declare the additional route explicitly on the controller handler (like @GetMapping("/some/greeting", "/some/greeting/") for more targeted cases.
Until your application fully adapts to this change, you can change the default with the following global configuration:
@Configuration
public class WebConfiguration implements WebMvcConfigurer {
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
configurer.setUseTrailingSlashMatch(true);
}
}
}
Spring Boot 3.0 uses Hibernate 6.1 by default. Please see the Hibernate 6.0 and 6.1 migration guides to learn how this may affect your application.
Dependency management and the spring-boot-starter-data-jpa starter have been updated to use the new org.hibernate.orm group ID for their Hibernate dependencies.
The spring.jpa.hibernate.use-new-id-generator-mappings configuration property has been removed as Hibernate no longer supports switching back to the old ID generator mappings.
Spring Boot 3.0 uses R2DBC 1.0 by default. With the 1.0 release, R2DBC no longer publishes a bill of materials (bom) which has affected Spring Boot?s dependency management. The r2dbc-bom.version can no longer be used to override R2DBC?s version. In its place, several new properties for the individual and separately versioned modules are now available:
Support for Elasticsearch?s high-level REST client has been removed. In its place, auto-configuration for Elasticsearch?s new Java client has been introduced. Similarly, support for the Spring Data Elasticsearch templates that built on top of the high-level REST client has been removed. In its place, auto-configuration for the new templates that build upon the new Java client has been introduced. See the Elasticsearch section of the reference documentation for further details.
ReactiveElasticsearchRestClientAutoConfiguration has been renamed to ReactiveElasticsearchClientAutoConfiguration and has moved from org.springframework.boot.autoconfigure.data.elasticsearch to org.springframework.boot.autoconfigure.elasticsearch. Any auto-configuration exclusions or ordering should be updated accordingly.
YamlJsonParser has been removed as SnakeYAML?s JSON parsing was inconsistent with the other parser implementations. In the unlikely event that you were using YamlJsonParser directly, please migrate to one of the other JsonParser implementations.
A ReactiveUserDetailsService is no longer auto-configured in the presence of an AuthenticationManagerResolver. If you application relies on ReactiveUserDetailService despite the presence of an AuthenticationManagerResolver, define your own ReactiveUserDetailsService bean that meets its needs.
Running multiple batch jobs is no longer supported. If the auto-configuration detects a single job is, it will be executed on startup. If multiple jobs are found in the context, a job name to execute on startup must be supplied by the user using the spring.batch.job.name property.
Explicitly configuring the store type for Spring session via spring.session.store-type is no longer supported. In case multiple session store repository implementations are detected on the classpath, a fixed order is used to determine which SessionRepository should be auto-configured. If Spring Boot?s defined ordering doesn?t meet your needs, you can define your own SessionRepository bean and cause the auto-configuration to back off.
More use cases are supported in this milestone, including the actuator (including the use of a separate management context).
Making a PUT to Prometheus Push Gateway on Shutdown
The Push Gateway can be configured to perform a PUT on shutdown. To do so, set management.prometheus.metrics.export.pushgateway.shutdown-operation to put. Additionally, the existing push setting has been deprecated and post should now be used instead.
Hibernate Metrics Auto-configuration Reinstated
With the upgrade to Hibernate 6.1, its hibernate-micrometer module is now compatible with Jakarta EE 9. As a result, auto-configuration for Hibernate metrics has been reinstated.
Elasticsearch Java Client
Auto-configuration for the new Elasticsearch Java Client has been introduced. It can be configured using the existing spring.elasticsearch.* configuration properties.
Auto-configuration of JdkClientHttpConnector
In the absence of Reactor Netty, Jetty?s reactive client, and the Apache HTTP client a JdkClientHttpConnector will now be auto-configured. This allows WebClient to be used with the JDK?s HttpClient.
Dependency Upgrades
Spring Boot 3.0.0-M4 moves to new versions of several Spring projects:
Uh oh!
There was an error while loading. Please reload this page.
labels: ["upgrade:boot-recipe","3.0.0","epic"]
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0.0-M4-Release-Notes
Spring Boot 3.0.0 M4 Release Notes
Spring MVC and WebFlux URL matching changes
As of Spring Framework 6.0, the trailing slash matching configuration option has been deprecated and its default value set to
false
. This means that previously, the following controller would match both "GET /some/greeting" and "GET /some/greeting/":As of this Spring Framework change, "GET /some/greeting/" doesn?t match anymore by default.
Developers should instead configure explicit redirects/rewrites through a proxy, a Servlet/web filter, or even declare the additional route explicitly on the controller handler (like
@GetMapping("/some/greeting", "/some/greeting/")
for more targeted cases.Until your application fully adapts to this change, you can change the default with the following global configuration:
PathMatchConfigurer
] #248Hibernate 6.1
Spring Boot 3.0 uses Hibernate 6.1 by default. Please see the Hibernate 6.0 and 6.1 migration guides to learn how this may affect your application.
Dependency management and the
spring-boot-starter-data-jpa
starter have been updated to use the neworg.hibernate.orm
group ID for their Hibernate dependencies.The
spring.jpa.hibernate.use-new-id-generator-mappings
configuration property has been removed as Hibernate no longer supports switching back to the old ID generator mappings.Flyway 9.0
Spring Boot 3.0 uses Flyway 9.0 by default. Please see the Flyway release notes and blog post to learn how this may affect your application.
R2DBC 1.0
Spring Boot 3.0 uses R2DBC 1.0 by default. With the 1.0 release, R2DBC no longer publishes a bill of materials (bom) which has affected Spring Boot?s dependency management. The
r2dbc-bom.version
can no longer be used to override R2DBC?s version. In its place, several new properties for the individual and separately versioned modules are now available:oracle-r2dbc.version
(com.oracle.database.r2dbc:oracle-r2dbc
)r2dbc-h2.version
(io.r2dc:r2dbc-h2
)r2dbc-pool.version
(io.r2dc:r2dbc-pool
)r2dbc-postgres.version
(io.r2dc:r2dbc-postgres
)r2dbc-proxy.version
(io.r2dc:r2dbc-proxy
)r2dbc-spi.version
(io.r2dc:r2dbc-spi
)3.0.0-M4 R2DBC 1.0 #247
Elasticsearch Clients and Templates
Support for Elasticsearch?s high-level REST client has been removed. In its place, auto-configuration for Elasticsearch?s new Java client has been introduced. Similarly, support for the Spring Data Elasticsearch templates that built on top of the high-level REST client has been removed. In its place, auto-configuration for the new templates that build upon the new Java client has been introduced. See the Elasticsearch section of the reference documentation for further details.
ReactiveElasticsearchRestClientAutoConfiguration
ReactiveElasticsearchRestClientAutoConfiguration
has been renamed toReactiveElasticsearchClientAutoConfiguration
and has moved fromorg.springframework.boot.autoconfigure.data.elasticsearch
toorg.springframework.boot.autoconfigure.elasticsearch
. Any auto-configuration exclusions or ordering should be updated accordingly.YamlJsonParser Has Been Removed
YamlJsonParser
has been removed as SnakeYAML?s JSON parsing was inconsistent with the other parser implementations. In the unlikely event that you were usingYamlJsonParser
directly, please migrate to one of the otherJsonParser
implementations.ReactiveUserDetailsService
A
ReactiveUserDetailsService
is no longer auto-configured in the presence of anAuthenticationManagerResolver
. If you application relies onReactiveUserDetailService
despite the presence of anAuthenticationManagerResolver
, define your ownReactiveUserDetailsService
bean that meets its needs.Multiple Batch Jobs
Running multiple batch jobs is no longer supported. If the auto-configuration detects a single job is, it will be executed on startup. If multiple jobs are found in the context, a job name to execute on startup must be supplied by the user using the
spring.batch.job.name
property.Spring Session Store Type
Explicitly configuring the store type for Spring session via
spring.session.store-type
is no longer supported. In case multiple session store repository implementations are detected on the classpath, a fixed order is used to determine whichSessionRepository
should be auto-configured. If Spring Boot?s defined ordering doesn?t meet your needs, you can define your own SessionRepository bean and cause the auto-configuration to back off.Minimum Requirements Changes
Spring Boot 3.0.0-M4 makes the following changes to the minimum supported versions:
Gradle 7.5
Hibernate 6.1
Kotlin 1.7
New and Noteworthy
Tip
Check the configuration changelog for a complete overview of the changes in configuration.
Native Image support
More use cases are supported in this milestone, including the actuator (including the use of a separate management context).
Making a PUT to Prometheus Push Gateway on Shutdown
The Push Gateway can be configured to perform a
PUT
on shutdown. To do so, setmanagement.prometheus.metrics.export.pushgateway.shutdown-operation
toput
. Additionally, the existingpush
setting has been deprecated andpost
should now be used instead.Hibernate Metrics Auto-configuration Reinstated
With the upgrade to Hibernate 6.1, its
hibernate-micrometer
module is now compatible with Jakarta EE 9. As a result, auto-configuration for Hibernate metrics has been reinstated.Elasticsearch Java Client
Auto-configuration for the new Elasticsearch Java Client has been introduced. It can be configured using the existing
spring.elasticsearch.*
configuration properties.Auto-configuration of JdkClientHttpConnector
In the absence of Reactor Netty, Jetty?s reactive client, and the Apache HTTP client a
JdkClientHttpConnector
will now be auto-configured. This allowsWebClient
to be used with the JDK?sHttpClient
.Dependency Upgrades
Spring Boot 3.0.0-M4 moves to new versions of several Spring projects:
Spring Batch 5.0.0-M4
Spring Data 2022.0.0-M5
Spring Framework 6.0.0-M5
Spring HATEOAS 2.0.0-M5
Spring Integration 6.0.0-M4
Spring Kafka 3.0.0-M5
Spring REST Docs 3.0.0-M4
Spring Security 6.0.0-M6
Numerous third-party dependencies have also been updated, some of the more noteworthy of which are the following:
Flyway 9
Hibernate 6.1
Liquibase 4.13
Lettuce 6.2
Log4j 2.18
Micrometer 1.10.0-M3
Micrometer Tracing 1.0.0-M6
OkHttp 4.10
R2DBC 1.0
Reactor 2022.0.0-M4
Miscellaneous
Apart from the changes listed above, there have also been some minor tweaks and improvements including:
Micrometer?s
JvmCompilationMetrics
are now auto-configured.WebDriverScope
andWebDriverTestExecutionListener
have been made public to ease the use ofWebDriver
in custom test setup.A
DataSourceBuilder
can now be derived from a wrappedDataSource
.Existing Kafka topics can be modified using
spring.kafka.admin.modify-topic-configs
.Trusted proxies of Tomcat?s remote IP valve can be configured using
server.tomcat.remoteip.trusted-proxies
.Deprecations in Spring Boot 3.0
The
push
setting ofmanagement.prometheus.metrics.export.pushgateway.shutdown-operation
in favor ofpost
.@AutoConfigureMetrics
has been deprecated in favor of@AutoConfigureObservability
.The text was updated successfully, but these errors were encountered: