Skip to content

Commit b709909

Browse files
committed
Merge branch '3.0.x' into 3.1.x
Closes gh-36268
2 parents ea91b2f + 4d70b83 commit b709909

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/ClientHttpRequestFactories.java

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,14 @@ private ClientHttpRequestFactories() {
7474
}
7575

7676
/**
77-
* Return a new {@link ClientHttpRequestFactory} instance using the most appropriate
78-
* implementation.
77+
* Return a {@link ClientHttpRequestFactory} implementation with the given
78+
* {@code settings} applied. The first of the following implementations whose
79+
* dependencies {@link ClassUtils#isPresent are available} is returned:
80+
* <ol>
81+
* <li>{@link HttpComponentsClientHttpRequestFactory}</li>
82+
* <li>{@link OkHttp3ClientHttpRequestFactory}</li>
83+
* <li>{@link SimpleClientHttpRequestFactory}</li>
84+
* </ol>
7985
* @param settings the settings to apply
8086
* @return a new {@link ClientHttpRequestFactory}
8187
*/
@@ -91,8 +97,17 @@ public static ClientHttpRequestFactory get(ClientHttpRequestFactorySettings sett
9197
}
9298

9399
/**
94-
* Return a new {@link ClientHttpRequestFactory} of the given type, applying
95-
* {@link ClientHttpRequestFactorySettings} using reflection if necessary.
100+
* Return a new {@link ClientHttpRequestFactory} of the given
101+
* {@code requestFactoryType}, applying {@link ClientHttpRequestFactorySettings} using
102+
* reflection if necessary. The following implementations are supported without the
103+
* use of reflection:
104+
* <ul>
105+
* <li>{@link HttpComponentsClientHttpRequestFactory}</li>
106+
* <li>{@link OkHttp3ClientHttpRequestFactory}</li>
107+
* <li>{@link SimpleClientHttpRequestFactory}</li>
108+
* </ul>
109+
* A {@code requestFactoryType} of {@link ClientHttpRequestFactory} is equivalent to
110+
* calling {@link #get(ClientHttpRequestFactorySettings)}.
96111
* @param <T> the {@link ClientHttpRequestFactory} type
97112
* @param requestFactoryType the {@link ClientHttpRequestFactory} type
98113
* @param settings the settings to apply

0 commit comments

Comments
 (0)