Skip to content

Spring Boot 4.1.0 M3 Release Notes

Phillip Webb edited this page Mar 20, 2026 · 38 revisions

Spring Boot 4.1.0-M3 Release Notes

For changes in earlier milestones, please refer to:

Upgrading from Spring Boot 4.0

RabbitMQ Support

Our RabbitMQ support has moved from spring-boot-amqp to spring-boot-rabbitmq in preparation for AMQP 1.0 support. Users of RabbitMQ should migrate their Spring Boot dependencies from amqp to rabbitmq. Configuration properties remain in the spring.rabbitmq namespace.

New and Noteworthy

Tip
Check the configuration changelog for a complete overview of the changes in configuration.

Spring gRPC Support

Spring Boot 4.1 now provides support for writing and testing gRPC server and client applications. You can write both stand-alone servers (backed by Netty) or use Servlet integration and expose gRPC over HTTP/2.

Documentation for this feature will be delivered in our RC release next month. Adventurous early adopters can review the spring-boot-grpc-server, spring-boot-grpc-client and spring-boot-grpc-test modules. There are also a few smoke tests in our repository and samples in the spring-grpc repository that you can take a look at.

Current Spring gRPC 1.0 users might want to look at commits 76ff80a2 and 5ab487f1 which show the updates that we needed to make to migrate to Spring Boot 4.1.

File Rotation Support for Log4j

Support for configurable file rotation has been added for Log4j, with four strategies:

  • size (default): Rolls files based on their size.

  • time: Rolls files based on a time interval.

  • size-and-time: Rolls when both size and time conditions are met.

  • cron: Rolls based on a cron expression schedule.

Docker Compose

In the event of a failure when it calls docker compose up or docker compose start, Spring Boot’s Docker Compose support will now log the output of docker compose logs. The log message is output at the level specified by spring.docker.compose.start.log-level. It defaults to info.

OpenTelemetry Enhancements

The new property management.opentelemetry.enabled can be used to disable the OpenTelemetry SDK. It then uses no-op implementations for the SdkTracerProvider, SdkLoggerProvider and SdkMeterProvider, but still configures the propagators. Additionally, it doesn’t create the tracing and logging beans which would be superfluous for a disabled SDK.

Properties have been added to configure OpenTelemetry’s BatchLogRecordProcessor, similar to the properties for BatchSpanProcessor.

A new property management.opentelemetry.tracing.sampler has been added for configuring OpenTelemetry’s sampler.

There’s also auto-configuration for SpanLimits and LogLimits, with properties under management.opentelemetry.tracing.limits. and management.opentelemetry.logging.limits. to configure them.

Support for OTLP exemplars has been added to Micrometer’s OtlpRegistry. This will automatically be configured if you’re using metrics over OTLP and Micrometer Tracing.

SSL bundle support has been added to OTLP logging, metrics and trace exporters.

BuildInfo Gradle Task

By default, the BuildInfo Gradle task now produces a file named META-INF/build-info.properties in its configured destination directory. Previously, the file was named build-info.properties. The new filename property can be used to customize the name and, if required, restore the previous name.

The buildInfo methods on the Spring Boot DSL have been updated to improve the configuration of task inter-dependencies. The destination directory of the bootBuildInfo task is now configured as a source directory of the main source set’s resources. This improves the visibility of the generated file in IDEs that do not delegate to Gradle. It also provides Gradle with better information about the tasks' interdependencies and the relationship between their inputs and outputs.

Cookie handling with TestRestTemplate has been updated to align with RestTemplate. The new withCookieHandling method can be used to configure the handling as required.

Similar to TestRestTemplate, RestTemplateBuilder and HttpClientSettings also now allow cookie handling to be configured. When using an auto-configured HTTP client, cookie handling can be configured using the new spring.http.clients.cookie-handling configuration property.

OAuth2 Resource Server

Auto-configuration is now provided for extracting authorities from a JWT using one or more SpEL expressions. To enable the support, set the spring.security.oauth2.resourceserver.jwt.authorities-claim-expressions property. It is supported in both Servlet and Reactive applications and is mutually exclusive with the existing spring.security.oauth2.resourceserver.jwt.authorities-claim-name and spring.security.oauth2.resourceserver.jwt.authorities-claim-delimiter properties. Set spring.security.oauth2.resourceserver.jwt.authority-prefix if the resulting authorities should have a prefix other than the SCOPE_ default.

MongoDB Support for Spring Batch

Auto-configuration for Spring Batch using MongoDB is provided, alongside a new spring-boot-batch-data-mongo starter.

The schema required to run Spring Batch jobs can be created automatically on startup by settings the spring.batch.data.mongo.schema.initialize property to true. By default, the default schema is applied but a custom newline-delimited JSON script can be provided.

SSL Support for RabbitMQ Streams

Auto-configuration of SSL is now supported when using RabbitMQ Streams. To enable the support, set spring.rabbitmq.stream.ssl.enabled to true or use spring.rabbitmq.stream.ssl.bundle to configure the SSL bundle to use. SSL is also supported when using RabbitMQ Streams with Docker Compose or Testcontainers.

Jackson

Auto-configured Jackson mappers (JSON, XML, and CBOR) are configured with a HandlerInstantiator that creates handler instances from beans defined in the application context.

AMQP 1.0 Support

Support for AMQP 1.0 support has been added in the spring-boot-amqp module and related starters. This is a generic support using QPid Proton, suitable to connect to any AMQP 1.0-compliant broker. See the Spring AMQP reference guide for more details.

Users wishing to keep the same RabbitMQ features should migrate to spring-boot-starter-rabbitmq.

Miscellaneous

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

  • A new FailureAnalyzedException has been added and can be used when you want to throw an exception that include its own failure analysis.

  • OAuth2 resource servers can now be configured in non-webapps.

  • Empty objects in YAML files are now rained in the resulting PropertySource.

  • The property management.tracing.exemplars.filter can be used to exercise more fine-grained support for selecting metric exemplars.

  • It’s now possible to bind default properties when an empty property is defined (see the updated documentation for details)

Deprecations in Spring Boot 4.1.0-M3

  • Given its decrease in popularity and support, the LiveReload feature in Devtools is deprecated with no replacement.

Clone this wiki locally