From 58f30546242eeb00f3770d0bfbf717cad2d04f16 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Wed, 21 Sep 2022 14:25:59 +0200 Subject: [PATCH] Adapt RestTemplate factory auto-detection This commit adapts the auto-detection of `ClientHttpRequestFactory` to look for an httpclient5 class. See gh-32461 --- .../boot/web/client/ClientHttpRequestFactorySupplier.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/ClientHttpRequestFactorySupplier.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/ClientHttpRequestFactorySupplier.java index af66a10e80..ee6f801869 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/ClientHttpRequestFactorySupplier.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/ClientHttpRequestFactorySupplier.java @@ -38,7 +38,7 @@ import org.springframework.util.ClassUtils; */ public class ClientHttpRequestFactorySupplier implements Supplier { - private static final String APACHE_HTTP_CLIENT_CLASS = "org.apache.http.client.HttpClient"; + private static final String APACHE_HTTP_CLIENT_CLASS = "org.apache.hc.client5.http.impl.classic.HttpClients"; private static final boolean APACHE_HTTP_CLIENT_PRESENT = ClassUtils.isPresent(APACHE_HTTP_CLIENT_CLASS, null);