From f536819c5d2b90c04741446fe4fa9c158252f1fd Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 11 Feb 2020 14:01:21 +0000 Subject: [PATCH] Update advice on RestTemplate Closes gh-24503 --- .../springframework/web/client/RestTemplate.java | 13 +++++-------- src/docs/asciidoc/integration.adoc | 8 ++++---- src/docs/asciidoc/web/webmvc-client.adoc | 10 ++++------ 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java b/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java index a1444b05d99..74ec11a14ef 100644 --- a/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java +++ b/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,13 +72,10 @@ import org.springframework.web.util.UriTemplateHandler; * addition to the generalized {@code exchange} and {@code execute} methods that * support of less frequent cases. * - *

NOTE: As of 5.0, the non-blocking, reactive - * {@code org.springframework.web.reactive.client.WebClient} offers a - * modern alternative to the {@code RestTemplate} with efficient support for - * both sync and async, as well as streaming scenarios. The {@code RestTemplate} - * will be deprecated in a future version and will not have major new features - * added going forward. See the WebClient section of the Spring Framework reference - * documentation for more details and example code. + *

NOTE: As of 5.0 this class is in maintenance mode, with + * only minor requests for changes and bugs to be accepted going forward. Please, + * consider using the {@code org.springframework.web.reactive.client.WebClient} + * which has a more modern API and supports sync, async, and streaming scenarios. * * @author Arjen Poutsma * @author Brian Clozel diff --git a/src/docs/asciidoc/integration.adoc b/src/docs/asciidoc/integration.adoc index d93394766fd..bb454b6624e 100644 --- a/src/docs/asciidoc/integration.adoc +++ b/src/docs/asciidoc/integration.adoc @@ -973,10 +973,10 @@ method API. * <>: a non-blocking, reactive alternative that supports both synchronous and asynchronous as well as streaming scenarios. -NOTE: As of 5.0, the non-blocking, reactive `WebClient` offers a modern alternative to the -`RestTemplate` with efficient support for both synchronous and asynchronous as well as streaming -scenarios. The `RestTemplate` will be deprecated in a future version and will not have -major new features added going forward. +NOTE: As of 5.0 the `RestTemplate` is in maintenance mode, with only minor requests for +changes and bugs to be accepted going forward. Please, consider using the +<> which offers a more modern API and +supports sync, async, and streaming scenarios. [[rest-resttemplate]] diff --git a/src/docs/asciidoc/web/webmvc-client.adoc b/src/docs/asciidoc/web/webmvc-client.adoc index b1184ee030f..147344c78d6 100644 --- a/src/docs/asciidoc/web/webmvc-client.adoc +++ b/src/docs/asciidoc/web/webmvc-client.adoc @@ -13,12 +13,10 @@ This section describes options for client-side access to REST endpoints. Spring REST client and exposes a simple, template-method API over underlying HTTP client libraries. -NOTE: As of 5.0, the non-blocking, reactive `WebClient` offers a modern alternative to the -`RestTemplate`, with efficient support for both -<>, as well as -streaming scenarios. The `RestTemplate` will be deprecated in a future version and will -not have major new features added going forward. - +NOTE: As of 5.0 the `RestTemplate` is in maintenance mode, with only minor requests for +changes and bugs to be accepted going forward. Please, consider using the +<> which offers a more modern API and +supports sync, async, and streaming scenarios. See <> for details.