Skip to content

Commit dc561ae

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

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

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

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 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.
@@ -70,12 +70,10 @@
7070
* addition to the generalized {@code exchange} and {@code execute} methods that
7171
* support of less frequent cases.
7272
*
73-
* <p><strong>NOTE:</strong> As of 5.0, the non-blocking, reactive
74-
* {@code org.springframework.web.reactive.client.WebClient} offers a
75-
* modern alternative to the {@code RestTemplate} with efficient support for
76-
* both sync and async, as well as streaming scenarios. The {@code RestTemplate}
77-
* will be deprecated in a future version and will not have major new features
78-
* added going forward.
73+
* <p><strong>NOTE:</strong> As of 5.0 this class is in maintenance mode, with
74+
* only minor requests for changes and bugs to be accepted going forward. Please,
75+
* consider using the {@code org.springframework.web.reactive.client.WebClient}
76+
* which has a more modern API and supports sync, async, and streaming scenarios.
7977
*
8078
* @author Arjen Poutsma
8179
* @author Brian Clozel
@@ -89,7 +87,7 @@
8987
*/
9088
public class RestTemplate extends InterceptingHttpAccessor implements RestOperations {
9189

92-
private static boolean romePresent =
90+
private static final boolean romePresent =
9391
ClassUtils.isPresent("com.rometools.rome.feed.WireFeed",
9492
RestTemplate.class.getClassLoader());
9593

Diff for: src/docs/asciidoc/integration.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -956,10 +956,10 @@ that supports both sync and async, as well as streaming scenarios.
956956

957957
[NOTE]
958958
====
959-
As of 5.0, the non-blocking, reactive `WebClient` offers a modern alternative to the
960-
`RestTemplate` with efficient support for both sync and async, as well as streaming
961-
scenarios. The `RestTemplate` will be deprecated in a future version and will not have
962-
major new features gong forward.
959+
As of 5.0 the `RestTemplate` is in maintenance mode, with only minor requests for
960+
changes and bugs to be accepted going forward. Please, consider using the
961+
<<web-reactive.adoc#webflux-client, WebClient>> which offers a more modern API and
962+
supports sync, async, and streaming scenarios.
963963
====
964964

965965

Diff for: src/docs/asciidoc/web/webmvc-client.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ libraries.
1515

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

2424
See <<integration.adoc#rest-client-access,RestTemplate>> for details.

0 commit comments

Comments
 (0)