Spring Boot 4.2.0 released: RestTemplate deprecated, some defaults changed silently
Spring Boot 4.2.0 was released on 19 November 2026. RestTemplate, TestRestTemplate and the related infrastructure are deprecated, which means they still compile and run but produce a compiler warning; the suggested replacement is RestClient[1] for RestTemplate and RestTestClient for TestRestTemplate. The KafkaProperties methods buildConsumerProperties(), buildProducerProperties() and buildAdminProperties() are also deprecated, with KafkaConfigBuilder offered instead.
The final version of Spring for Apache Pulsar is 2.0.8, and Spring no longer releases updates for it; maintenance moves to the Apache Pulsar project under the name Apache Pulsar support for Spring. Some defaults changed without any warning: server.tomcat.servlet.use-relative-redirects now defaults to true, so redirects are relative paths instead of absolute URLs, and the X-Forwarded-Prefix header is ignored by default. Dependency management for Janino has been removed, so projects that use Janino must now specify its version themselves.
The release adds AMQP 1.0 support[2] and faster startup of executable jars[3], but no exact percentage of speed-up is given. Support for the Spring Boot 4.1.x line ends on 31 July 2027.
Repository Spring Boot github.com
Java framework that helps build production-grade Spring-based applications and services with minimal setup and configuration.
Sources
-
CNJuejin ZH
SpringBoot4.2正式发布,人麻了!



