Adapt RestTemplate factory auto-detection

This commit adapts the auto-detection of `ClientHttpRequestFactory` to
look for an httpclient5 class.

See gh-32461
This commit is contained in:
Brian Clozel 2022-09-21 14:25:59 +02:00
parent 5fb2a50ad0
commit 58f3054624
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ import org.springframework.util.ClassUtils;
*/
public class ClientHttpRequestFactorySupplier implements Supplier<ClientHttpRequestFactory> {
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);