WIP
authorKai Moritz <kai@juplo.de>
Fri, 8 Jan 2021 14:16:45 +0000 (15:16 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 8 Jan 2021 14:16:45 +0000 (15:16 +0100)
src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java

index 2d1af52..aec1079 100644 (file)
@@ -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();
        }