Skip to content

Commit 58f3054

Browse files
committed
Adapt RestTemplate factory auto-detection
This commit adapts the auto-detection of `ClientHttpRequestFactory` to look for an httpclient5 class. See gh-32461
1 parent 5fb2a50 commit 58f3054

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*/
3939
public class ClientHttpRequestFactorySupplier implements Supplier<ClientHttpRequestFactory> {
4040

41-
private static final String APACHE_HTTP_CLIENT_CLASS = "org.apache.http.client.HttpClient";
41+
private static final String APACHE_HTTP_CLIENT_CLASS = "org.apache.hc.client5.http.impl.classic.HttpClients";
4242

4343
private static final boolean APACHE_HTTP_CLIENT_PRESENT = ClassUtils.isPresent(APACHE_HTTP_CLIENT_CLASS, null);
4444

0 commit comments

Comments
 (0)