= Spring Boot 3.1.0-M1 Release Notes



== Upgrading from Spring Boot 3.0



=== Dependency Management for Apache HttpClient 4
Support for Apache HttpClient 4 with `RestTemplate` was https://github.com/spring-projects/spring-framework/issues/28925[removed in Spring Framework 6], in favor of Apache HttpClient 5. Spring Boot 3.0 includes dependency management for both HttpClient 4 and 5. Applications that continue to use HttpClient 4 can experience https://github.com/spring-projects/spring-boot/issues/33515[errors when using `RestTemplate`] that are difficult to diagnose. 

Spring Boot 3.1 removes dependency management for HttpClient 4 to encourage users to move to HttpClient 5 instead. 



=== Servet and Filter Registrations
The `ServletRegistrationBean` and `FilterRegistrationBean` classes will now fail with an `IllegalStateException` rather than logging a warning if registration fails.
If you need the old behavior, you should call `setIgnoreRegistrationFailure(true)` on your registration bean.



=== Minimum Requirements Changes
None.



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



=== Different log levels for file and console
If you're using Logback or Log4j2, there's now the option to have different log levels for console logs and file logs. This can be set using the configuration properties `logging.threshold.console` and `logging.threshold.file`.



=== Maximum HTTP Response Header Size
You can now limit the maximum HTTP response header size if you are using Tomcat or Jetty.
For Tomcat you can use the `server.tomcat.max-http-response-header-size` property and for Jetty you can use `server.jetty.max-http-response-header-size`.
By default, response headers are limited to `8kb`.



=== Dependency Upgrades
Spring Boot 3.1.0-M1 moves to new versions of several Spring projects:

* Spring Data 2023.0.0-M2
* Spring Integration 6.1.0-M1
* Spring Security 6.1.0-M1 

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

* Kafka 3.4.0
* Kotlin 1.8.10
* Liquibase 4.19.0
* Micrometer 1.11.0-M1
* Micrometer Tracing 1.1.0-M1 



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

* Spring Kafka `ContainerCustomizer` beans are now applied to the auto-configured `KafkaListenerContainerFactory`.
* A `management.otlp.metrics.export.headers` property has been added to support sending headers to an OTLP registry.
* `JoranConfigurators` beans can now be used in AOT processing.
* Additional `close-timeout`, `operation-timeout`, `auto-startup` and `auto-create` properties have been added to `spring.kafka.admin`
* `BatchInterceptor` beans are now applied to the auto-configured `ConcurrentKafkaListenerContainerFactory`.
* Nomad has been added to the list of recognized `CloudPlaform` values.
* You can now specify a `registration-policy` property for `spring.jmx`.



== Deprecations in Spring Boot 3.1.0-M1
* The `spring.kafka.streams.cache-max-size-buffering` has been deprecated in favor of `spring.kafka.streams.state-store-cache-max-size`.
