Deprecate RestTemplate support

With Spring Framework 7.1 deprecating RestTemplate for removal, this
commit deprecates our supporting infrastructure as well, and steers
users towards RestClient instead:

* RestTemplateAutoConfiguration and
  RestTemplateObservationAutoConfiguration
* RestTemplateBuilder, RestTemplateBuilderConfigurer, and
  RestTemplateBuilderClientHttpRequestInitializer
* RestTemplateCustomizer, RestTemplateRequestCustomizer, and
  ObservationRestTemplateCustomizer
* MockRestServiceServerAutoConfiguration,
  MockServerRestTemplateCustomizer, and RootUriRequestExpectationManager
  in the test support module

The reference documentation no longer covers RestTemplate and now
solely documents RestClient and WebClient. Code snippets and sample
tests that only existed to illustrate RestTemplate usage have been
removed accordingly.

Closes gh-51118
This commit is contained in:
Stéphane Nicoll
2026-07-25 08:32:32 +02:00
parent 2a8da4b465
commit 3959c56bdd
67 changed files with 137 additions and 479 deletions
@@ -37,6 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
@SuppressWarnings("removal")
class DevToolsIntegrationTests extends AbstractDevToolsIntegrationTests {
private final TestRestTemplate template = new TestRestTemplate(new RestTemplateBuilder()