Adapt RestTemplate factory auto-detection

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

See gh-32461
pull/32551/head
Brian Clozel 2 years ago
parent 5fb2a50ad0
commit 58f3054624

@ -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);

Loading…
Cancel
Save