:boot-docs: https://docs.spring.io/spring-boot/3.5

= Spring Boot 3.5.0-M2 Release Notes



== Upgrading from Spring Boot 3.4


=== Prometheus Pushgateway
Pushing metrics to a https://github.com/prometheus/pushgateway[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.



=== Minimum Requirements Changes
None.



== New and Noteworthy
TIP: Check link:Spring-Boot-3.5.0-M2-Configuration-Changelog[the configuration changelog] for a complete overview of the changes in configuration.



=== Ignore Properties When Using `spring-boot-configuration-processor`

When using the `spring-boot-configuration-processor`, the `META-INF/additional-spring-configuration-metadata.json` file can now be used to ignore properties:

[source,json]
----
{
  "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.


=== Load Properties From Environment Variables

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:

[source]
----
my.var1=value1
my.var2=value2
----

can now be imported using the `env:` prefix:

[source,properties]
----
spring.config.import=env:MY_CONFIGURATION
----

After this, `my.var1` and `my.var2` are available in the `Environment`.

This feature supports properties and yaml format. For more details, please see {boot-docs}/reference/features/external-config.html#features.external-config.files.env-variables[the documentation].


=== Triggering Quartz Jobs From the Actuator

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 https://docs.spring.io/spring-boot/3.5/api/rest/actuator/quartz.html#quartz.trigger-job[the updated REST documentation] for an example.


=== Write Trace Ids in HTTP Response Headers

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.


=== Customizing Structured Logging Stack Traces

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 {boot-docs}/reference/features/logging.html#features.logging.structured.customizing-stack-traces[updated reference documentation].



=== Mappings Endpoint

The mappings endpoint now includes information about https://docs.spring.io/spring-framework/reference/6.2/web/webmvc-functional.html[WebMvc.fn router functions].
Consult the https://docs.spring.io/spring-boot/3.5/api/rest/actuator/mappings.html#mappings.retrieving.response-structure-dispatcher-servlets[Actuator REST API documentation] for details of the updated response structure.


=== SSL Support for Service Connections

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 {boot-docs}/reference/testing/testcontainers.html#testing.testcontainers.service-connections.ssl[new annotations], for Docker Compose you'd use https://docs.spring.io/spring-boot/3.5-SNAPSHOT/reference/features/dev-services.html#features.dev-services.docker-compose.ssl[labels].



=== Dependency Upgrades
Spring Boot 3.5.0-M2 moves to new versions of several Spring projects:

- https://github.com/micrometer-metrics/micrometer/releases/tag/v1.15.0-M2[Micrometer 1.15.0-M2]
- https://github.com/micrometer-metrics/tracing/releases/tag/v1.5.0-M2[Micrometer Tracing 1.5.0-M2]
- https://github.com/spring-projects/spring-authorization-server/releases/tag/1.5.0-M1[Spring Authorisation Server 1.5.0-M1]
- https://github.com/spring-projects/spring-data-bom/releases/tag/2025.0.0-M1[Spring Data 2025.0.0-M1]
- https://github.com/spring-projects/spring-hateoas/releases/tag/2.5.0-M1[Spring HATEOAS 2.5.0-M1]
- https://github.com/spring-projects/spring-integration/releases/tag/v6.5.0-M2[Spring Integration 6.5.0-M2]
- https://github.com/spring-projects/spring-ldap/releases/tag/3.3.0-M2[Spring LDAP 3.3.0-M2]
- https://github.com/spring-projects/spring-security/releases/tag/6.5.0-M2[Spring Security 6.5.0-M2]

Numerous third-party dependencies have also been updated, some of the more noteworthy of which are the following:

- https://github.com/openzipkin/brave/releases/tag/6.1.0[Brave 6.1.0]
- https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.17.0[Byte Buddy 1.17]
- Cassandra Driver 4.19
- https://commons.apache.org/proper/commons-codec/changes-report.html#a1.18.0[Commons Codec 1.18]
- https://www.elastic.co/guide/en/elasticsearch/reference/current/release-notes-8.17.0.html[Elasticsearch Client 8.17]
- https://documentation.red-gate.com/flyway/release-notes-and-older-versions/release-notes-for-flyway-engine[Flyway 11.3]
- https://github.com/google/gson/releases/tag/gson-parent-2.12.1[Gson 2.12]
- https://github.com/hamcrest/JavaHamcrest/releases/tag/v3.0[Hamcrest 3.0]
- https://github.com/open-telemetry/opentelemetry-java/releases/tag/v1.47.0[OpenTelemetry 1.47]
- https://github.com/mongodb/mongo-java-driver/releases/tag/r5.3.1[MongoDB 5.3]
- Oracle Database 23.7.0.25.01
- https://pulsar.apache.org/release-notes/versioned/pulsar-4.0.2[Pulsar 4.0]
- https://github.com/rabbitmq/rabbitmq-java-client/releases/tag/v5.25.0[Rabbit AMQP Client 5.25]
- https://github.com/rabbitmq/rabbitmq-stream-java-client/releases/tag/v0.22.0[Rabbit Stream Client 0.22]
- https://github.com/SeleniumHQ/htmlunit-driver/releases/tag/htmlunit-driver-4.28.0[Selenium HtmlUnit 4.28]
- SnakeYAML 2.4
- https://github.com/xerial/sqlite-jdbc/releases/tag/3.49.0.0[SQLite JDBC 3.49]
- https://github.com/ultraq/thymeleaf-layout-dialect/releases/tag/3.4.0[Thymeleaf Layout Dialect 3.4.0]
- https://github.com/pingidentity/ldapsdk/releases/tag/7.0.2[UnboundID LDAPSDK 7.0]
- https://github.com/openzipkin/zipkin-reporter-java/releases/tag/3.5.0[Zipkin Reporter 3.5.0]



=== Miscellaneous
Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:

* If `io.micrometer:micrometer-java21` is on the classpath, a https://docs.micrometer.io/micrometer/reference/reference/jvm.html#_java_21_metrics[`VirtualThreadsMetrics`] bean is now auto-configured.
* The `java.home` system property is no longer used when running in native image.
* The new property `spring.jooq.config` can be used to specify an external jOOQ settings.xml file or resource.
* New factory methods have been added to `SslManagerBundle` to create a `SslManagerBundle` from a `TrustManagerFactory` or from a `TrustManager`.
* The `logging.structured.json.customizer` properties now accepts more than one customizer.
* A new `spring.r2dbc.pool.acquire-retry` property has been added.
* `@ConditionalOnBean` now supports generic `@Bean` return types.
* `@ConditionalOnProperty` and `@ConditionalOnBooleanProperty` are now `@Repeatable`.
* Some unbindable properties with the prefixes `spring.datasource.dbcp2`, `spring.datasource.hikari`, `spring.datasource.oracleucp` and `spring.datasource.tomcat` have been removed from `spring-configuration-metadata.json`.
* The new property `spring.mvc.contentnegotiation.default-content-types` can be used to configure default content types with Spring MVC.
* `EndpointRequest` for both servlet and reactive stacks now supports matching on HTTP method.
* `SanitizingFunction` now has convenience builder methods. See `SanitizingFunction.sanitizeValue()` for an example.
* `@ConfigurationPropertiesBinding` annotated `@Bean` methods can now be implemented as lambdas.
* `ApplicationConversionService` now detected generic types from converter `@Bean` methods.
* A `CqlOperations` bean is now auto-configured and used internally by `CassandraTemplate`.
* A `ReactiveCqlOperations` bean is now auto-configured and used internally by `ReactiveCassandraTemplate`.
* An `ObjectDirectoryMapper` bean is now auto-configured and used internally by `LdapTemplate`.
* Renamed `management.server.accesslog.prefix` to `management.server.{server}.accesslog.prefix` where `{server}` can be `jetty`, `tomcat` or `undertow`.
* The property `spring.kafka.listener.auth-exception-retry-interval` has been added to configure the time between retries after authentication exceptions.



== Deprecations in Spring Boot 3.5.0-M2

* Support for SignalFX has been deprecated, following https://github.com/micrometer-metrics/micrometer/issues/5807[the deprecation in Micrometer].
* `org.springframework.boot.autoconfigure.security.servlet.RequestMatcherProvider` has been deprecated to move it to `org.springframework.boot.actuate.autoconfigure.security.servlet.RequestMatcherProvider`