-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Spring Boot 3.5.0 M2 Release Notes
Pushing metrics to a Prometheus Pushgateway now requires io.prometheus:prometheus-metrics-exporter-pushgateway instead of io.prometheus:simpleclient_pushgateway.
The new client’s Pushgateway support may also require a configuration change.
If you were using management.prometheus.metrics.export.pushgateway.base-url, replace it with management.prometheus.metrics.export.pushgateway.address and adjust the value to be in the form host:port.
Three new properties have been added in support of the new Pushgateway client:
-
management.prometheus.metrics.export.pushgateway.format -
management.prometheus.metrics.export.pushgateway.scheme -
management.prometheus.metrics.export.pushgateway.token
Set the scheme property to https to use SSL when pushing metrics.
Set the token property (instead of the existing username and password properties) to use token-based authentication.
Set the format property to text to push metrics as text rather than using protobuf.
|
Tip
|
Check the configuration changelog for a complete overview of the changes in configuration. |
When using the spring-boot-configuration-processor, the META-INF/additional-spring-configuration-metadata.json file can now be used to ignore properties:
{
"ignored": {
"properties": [
{
"name": "my.age"
}
]
}
}This removes my.age from the generated spring-configuration-metadata.json file.
Additionally, the information that my.age has been ignored is also recorded in the generated spring-configuration-metadata.json file.
While it was already possible to load a single property from an environment variable, it’s now possible to load multiple properties from a single environment variable.
For example, the multi-line environment variable MY_CONFIGURATION with this content:
my.var1=value1
my.var2=value2can now be imported using the env: prefix:
spring.config.import=env:MY_CONFIGURATIONAfter this, my.var1 and my.var2 are available in the Environment.
This feature supports properties and yaml format. For more details, please see the documentation.
The Quartz Actuator endpoint can now be used to trigger Quartz jobs by sending an HTTP POST to the /actuator/quartz/jobs/{groupName}/{jobName} URL.
See the updated REST documentation for an example.
If your application is using Micrometer Observations with Tracing support, you can now configure the http.server.requests observations
to write the current Trace Id (if present) as a X-Trace-Id HTTP response header. Your application will need to enable this feature with the new management.observations.http.server.requests.write-trace-header=true configuration property.
Stack Trace written to structured logs can now be customized to limit their size or print them in a different format.
You can use the logging.structured.json.stacktrace.* properties to configure stack trace output.
For details, see the updated reference documentation.
The mappings endpoint now includes information about WebMvc.fn router functions. Consult the Actuator REST API documentation for details of the updated response structure.
Client side SSL support has been added for selected service connections. This is supported for the following service connections:
-
Cassandra
-
Couchbase
-
Elasticsearch
-
Kafka
-
MongoDB
-
RabbitMQ
-
Redis
The Testcontainers and Docker Compose integrations have been updated to allow SSL configuration, too. For Testcontainers, you can use new annotations, for Docker Compose you’d use labels.
Spring Boot 3.5.0-M2 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:
-
Cassandra Driver 4.19
-
Oracle Database 23.7.0.25.01
-
SnakeYAML 2.4
Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:
-
If
io.micrometer:micrometer-java21is on the classpath, aVirtualThreadsMetricsbean is now auto-configured. -
The
java.homesystem property is no longer used when running in native image. -
The new property
spring.jooq.configcan be used to specify an external jOOQ settings.xml file or resource. -
New factory methods have been added to
SslManagerBundleto create aSslManagerBundlefrom aTrustManagerFactoryor from aTrustManager. -
The
logging.structured.json.customizerproperties now accepts more than one customizer. -
A new
spring.r2dbc.pool.acquire-retryproperty has been added. -
@ConditionalOnBeannow supports generic@Beanreturn types. -
@ConditionalOnPropertyand@ConditionalOnBooleanPropertyare now@Repeatable. -
Some unbindable properties with the prefixes
spring.datasource.dbcp2,spring.datasource.hikari,spring.datasource.oracleucpandspring.datasource.tomcathave been removed fromspring-configuration-metadata.json. -
The new property
spring.mvc.contentnegotiation.default-content-typescan be used to configure default content types with Spring MVC. -
EndpointRequestfor both servlet and reactive stacks now supports matching on HTTP method. -
SanitizingFunctionnow has convenience builder methods. SeeSanitizingFunction.sanitizeValue()for an example. -
@ConfigurationPropertiesBindingannotated@Beanmethods can now be implemented as lambdas. -
ApplicationConversionServicenow detected generic types from converter@Beanmethods. -
A
CqlOperationsbean is now auto-configured and used internally byCassandraTemplate. -
A
ReactiveCqlOperationsbean is now auto-configured and used internally byReactiveCassandraTemplate. -
An
ObjectDirectoryMapperbean is now auto-configured and used internally byLdapTemplate. -
Renamed
management.server.accesslog.prefixtomanagement.server.{server}.accesslog.prefixwhere{server}can bejetty,tomcatorundertow. -
The property
spring.kafka.listener.auth-exception-retry-intervalhas been added to configure the time between retries after authentication exceptions.
-
Support for SignalFX has been deprecated, following the deprecation in Micrometer.
-
org.springframework.boot.autoconfigure.security.servlet.RequestMatcherProviderhas been deprecated to move it toorg.springframework.boot.actuate.autoconfigure.security.servlet.RequestMatcherProvider