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

diff --git a/pom.xml b/pom.xml
index 1b7fcd2..64227c7 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-thymeleaf</artifactId>
                </dependency>
+               <dependency>
+                       <groupId>de.juplo</groupId>
+                       <artifactId>http-resources</artifactId>
+                       <version>2.0.0</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.httpcomponents</groupId>
+                       <artifactId>httpclient</artifactId>
+               </dependency>
 
                <dependency>
                        <groupId>org.springframework.boot</groupId>
index 71b8a6d..2d1af52 100644 (file)
@@ -1,11 +1,22 @@
 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;
+
 
 @SpringBootApplication
 public class HttpResourcesDemoApplication
 {
+       @Bean
+       public HttpClient httpClient()
+       {
+               return HttpClientBuilder.create().build();
+       }
+
+
        public static void main(String[] args)
        {
                SpringApplication.run(HttpResourcesDemoApplication.class, args);