]> juplo.de Git - demos/httpresources/commitdiff
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 1b7fcd2a31b907fe73cfc2a20038243268ab4ba2..64227c743b51e7ffac798e074bd24a1761f03e7a 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 71b8a6d9b98d5d20b83b86191f212a311b63f7a1..2d1af5248fb9651e03f7e2eba2c2d90d322bd043 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);