From: Kai Moritz Date: Fri, 8 Jan 2021 14:16:45 +0000 (+0100) Subject: WIP X-Git-Tag: controller~2 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=37f1a96fd52aa6e9a025079210b504fb8d6b57b5;p=demos%2Fhttpresources WIP --- diff --git a/src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java b/src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java index 2d1af52..aec1079 100644 --- a/src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java +++ b/src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java @@ -1,19 +1,19 @@ package de.juplo.demo.httpresources; -import org.apache.http.client.HttpClient; -import org.apache.http.impl.client.HttpClientBuilder; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; +import org.springframework.http.client.ClientHttpRequestFactory; +import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; @SpringBootApplication public class HttpResourcesDemoApplication { @Bean - public HttpClient httpClient() + public ClientHttpRequestFactory clientHttpRequestFactory() { - return HttpClientBuilder.create().build(); + return new HttpComponentsClientHttpRequestFactory(); }