From: Kai Moritz Date: Fri, 8 Jan 2021 14:12:40 +0000 (+0100) Subject: WIP X-Git-Tag: controller~3 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=7d50fb4b41c442cb2c873644c860efb8af15776d;p=demos%2Fhttpresources WIP --- diff --git a/pom.xml b/pom.xml index 1b7fcd2..64227c7 100644 --- a/pom.xml +++ b/pom.xml @@ -27,6 +27,15 @@ org.springframework.boot spring-boot-starter-thymeleaf + + de.juplo + http-resources + 2.0.0 + + + org.apache.httpcomponents + httpclient + org.springframework.boot diff --git a/src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java b/src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java index 71b8a6d..2d1af52 100644 --- a/src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java +++ b/src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java @@ -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);