From 7d50fb4b41c442cb2c873644c860efb8af15776d Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 8 Jan 2021 15:12:40 +0100 Subject: [PATCH] WIP --- pom.xml | 9 +++++++++ .../httpresources/HttpResourcesDemoApplication.java | 11 +++++++++++ 2 files changed, 20 insertions(+) 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); -- 2.20.1