Skip to content

Commit e35d3b8

Browse files
committed
Update advice on RestTemplate
Closes spring-projectsgh-24503
1 parent 0a97451 commit e35d3b8

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

spring-web/src/main/java/org/springframework/web/client/RestTemplate.java

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -72,13 +72,10 @@
7272
* addition to the generalized {@code exchange} and {@code execute} methods that
7373
* support of less frequent cases.
7474
*
75-
* <p><strong>NOTE:</strong> As of 5.0, the non-blocking, reactive
76-
* {@code org.springframework.web.reactive.client.WebClient} offers a
77-
* modern alternative to the {@code RestTemplate} with efficient support for
78-
* both sync and async, as well as streaming scenarios. The {@code RestTemplate}
79-
* will be deprecated in a future version and will not have major new features
80-
* added going forward. See the WebClient section of the Spring Framework reference
81-
* documentation for more details and example code.
75+
* <p><strong>NOTE:</strong> As of 5.0 this class is in maintenance mode, with
76+
* only minor requests for changes and bugs to be accepted going forward. Please,
77+
* consider using the {@code org.springframework.web.reactive.client.WebClient}
78+
* which has a more modern API and supports sync, async, and streaming scenarios.
8279
*
8380
* @author Arjen Poutsma
8481
* @author Brian Clozel

src/docs/asciidoc/integration.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -920,10 +920,10 @@ method API.
920920
* <<web-reactive.adoc#webflux-client, WebClient>>: a non-blocking, reactive alternative
921921
that supports both synchronous and asynchronous as well as streaming scenarios.
922922

923-
NOTE: As of 5.0, the non-blocking, reactive `WebClient` offers a modern alternative to the
924-
`RestTemplate` with efficient support for both synchronous and asynchronous as well as streaming
925-
scenarios. The `RestTemplate` will be deprecated in a future version and will not have
926-
major new features added going forward.
923+
NOTE: As of 5.0 the `RestTemplate` is in maintenance mode, with only minor requests for
924+
changes and bugs to be accepted going forward. Please, consider using the
925+
<<web-reactive.adoc#webflux-client, WebClient>> which offers a more modern API and
926+
supports sync, async, and streaming scenarios.
927927

928928

929929
[[rest-resttemplate]]

src/docs/asciidoc/web/webmvc-client.adoc

+4-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ This section describes options for client-side access to REST endpoints.
1313
Spring REST client and exposes a simple, template-method API over underlying HTTP client
1414
libraries.
1515

16-
NOTE: As of 5.0, the non-blocking, reactive `WebClient` offers a modern alternative to the
17-
`RestTemplate`, with efficient support for both
18-
<<web-reactive.adoc#webflux-client-synchronous, synchronous and asynchronous>>, as well as
19-
streaming scenarios. The `RestTemplate` will be deprecated in a future version and will
20-
not have major new features added going forward.
21-
16+
NOTE: As of 5.0 the `RestTemplate` is in maintenance mode, with only minor requests for
17+
changes and bugs to be accepted going forward. Please, consider using the
18+
<<web-reactive.adoc#webflux-client, WebClient>> which offers a more modern API and
19+
supports sync, async, and streaming scenarios.
2220

2321
See <<integration.adoc#rest-client-access, REST Endpoints>> for details.
2422

0 commit comments

Comments
 (0)