Skip to content

Commit f536819

Browse files
rstoyanchevjhoeller
authored andcommitted
Update advice on RestTemplate
Closes gh-24503
1 parent af75c6d commit f536819

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

Lines changed: 5 additions & 8 deletions
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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -973,10 +973,10 @@ method API.
973973
* <<web-reactive.adoc#webflux-client, WebClient>>: a non-blocking, reactive alternative
974974
that supports both synchronous and asynchronous as well as streaming scenarios.
975975

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

981981

982982
[[rest-resttemplate]]

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

Lines changed: 4 additions & 6 deletions
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)