-
Notifications
You must be signed in to change notification settings - Fork 40.8k
Spring Boot 2.7.0 M3 Release Notes
Embedded Mongo 3.4 has dropped support for configuring Mongo features.
Reflecting this, the spring.mongodb.embedded.features
configuration property has been removed.
For advanced configuration where features were being specified to alter the command line used to launch Mongo, a custom MongodConfig
bean should be provided instead.
The following Mustache-related properties that are Servlet-specific have been deprecated:
-
spring.mustache.allow-request-override
-
spring.mustache.allow-session-override
-
spring.mustache.cache
-
spring.mustache.content-type
-
spring.mustache.expose-request-attributes
-
spring.mustache.expose-session-attributes
-
spring.mustache.expose-spring-macro-helpers
The following replacements have been introduced:
-
spring.mustache.servlet.allow-request-override
-
spring.mustache.servlet.allow-session-override
-
spring.mustache.servlet.cache
-
spring.mustache.servlet.content-type
-
spring.mustache.servlet.expose-request-attributes
-
spring.mustache.servlet.expose-session-attributes
-
spring.mustache.servlet.expose-spring-macro-helpers
The default indices options on the auto-configured ReactiveElasticsearchTemplate
have changed to align them with Spring Data Elasticsearch.
Previously, the defaults were strictExpandOpenAndForbidClosed
.
They are now strictExpandOpenAndForbidClosedIgnoreThrottled
.
To restore the old indices options, define your own reactiveElasticsearchTemplate
bean:
@Bean
ReactiveElasticsearchTemplate reactiveElasticsearchTemplate(ReactiveElasticsearchClient client,
ElasticsearchConverter converter) {
ReactiveElasticsearchTemplate template = new ReactiveElasticsearchTemplate(client, converter);
template.setIndicesOptions(IndicesOptions.strictExpandOpenAndForbidClosed());
return template;
}
Previously, if spring.data.mongodb.uri
was configured alongside any of the equivalent separate properties such as spring.data.mongodb.host
and spring.data.mongodb.port
an exception would be thrown.
The uri
property now takes precedence over any of the separate properties – they’re ignored when spring.data.mongodb.uri
is set.
This aligns the behavior with other similar properties such as spring.redis.url
.
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
SanitizingFunction
beans are now called in order, stopping once a function has changed the value of the SanitizableData
.
If no SanitizingFunction
bean sanitizes the value, the built-in key-based sanitization is performed.
Functions are ordered through their @Order
annotations or their Ordered
implementation.
As of 1.0.0-M6
, Spring GraphQL ships a new GraphQL client. Spring Boot applications can now depend on the GraphQL starter even if they don’t intend to ship a GraphQL API. As a result the server auto-configuration has been reworked in #30035.
A GraphQL server is only set up if Spring Boot detects GraphQL schema files in the configured locations or GraphQlSourceBuilderCustomizer
beans.
Dependency management and auto-configuration for Cache2k has been added.
Default cache settings can be customized by defining a Cache2kBuilderCustomizer
bean.
Spring Boot 2.7.0-M3 moves to new versions of several Spring projects:
Numerous third-party dependencies have also been updated, some of the more noteworthy of which are the following:
Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:
-
Spring GraphQL is now using the Spring Boot
ApplicationConversionService
for its annotated controllers. -
A new property,
spring.mustache.reactive.media-types
, can be used to configure the media types supported by a reactive Mustache view.
-
The Micrometer team moved the binders to a separate micrometer module named
micrometer-binders
and deprecated the old binders. To prevent split packages, the imports have changed, too. If you are using the old binders, please adjust your imports fromio.micrometer.core.instrument.binder
toio.micrometer.binder
. Spring Boot 2.7 still supports auto-configuration for the binders in the old module, but this support will be removed in Spring Boot 3.0.