Skip to content

Commit bdf7351

Browse files
committed
Update javadoc for (Async)RestTemplate
Issue: SPR-13313
1 parent 2e79a30 commit bdf7351

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

spring-web/src/main/java/org/springframework/http/client/support/HttpAccessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ public abstract class HttpAccessor {
5050

5151

5252
/**
53-
* Set the request factory that this accessor uses for obtaining {@link ClientHttpRequest HttpRequests}.
53+
* Set the request factory that this accessor uses for obtaining
54+
* {@link ClientHttpRequest HttpRequests}.
5455
*/
5556
public void setRequestFactory(ClientHttpRequestFactory requestFactory) {
5657
Assert.notNull(requestFactory, "'requestFactory' must not be null");

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@
6363
* {@linkplain #setMessageConverters(List) message converters} with this
6464
* {@code RestTemplate}.
6565
*
66+
* <p><strong>Note:</strong> by default {@code AsyncRestTemplate} relies on
67+
* standard JDK facilities to establish HTTP connections. You can switch to use
68+
* a different HTTP library such as Apache HttpComponents, Netty, and OkHttp by
69+
* using a constructor accepting an {@link AsyncClientHttpRequestFactory}.
70+
*
6671
* <p>For more information, please refer to the {@link RestTemplate} API documentation.
6772
*
6873
* @author Arjen Poutsma

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
* It handles HTTP connections, leaving application code to provide URLs
6161
* (with possible template variables) and extract results.
6262
*
63+
* <p><strong>Note:</strong> by default the RestTemplate relies on standard JDK
64+
* facilities to establish HTTP connections. You can switch to use a different
65+
* HTTP library such as Apache HttpComponents, Netty, and OkHttp through the
66+
* {@link #setRequestFactory} property.
67+
*
6368
* <p>The main entry points of this template are the methods named after the six main HTTP methods:
6469
* <table>
6570
* <tr><th>HTTP method</th><th>RestTemplate methods</th></tr>

0 commit comments

Comments
 (0)