From: Kai Moritz Date: Sat, 16 Jan 2021 10:14:47 +0000 (+0100) Subject: WIP X-Git-Url: https://juplo.de/gitweb/?p=demos%2Fhttpresources;a=commitdiff_plain;h=b8458ac2d504532a1893bfac0948ce6f900aa521 WIP --- diff --git a/pom.xml b/pom.xml index 64227c7..bdc99e7 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ de.juplo - http-resources + thymeproxy 2.0.0 diff --git a/src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java b/src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java index f839e27..aec1079 100644 --- a/src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java +++ b/src/main/java/de/juplo/demo/httpresources/HttpResourcesDemoApplication.java @@ -1,11 +1,8 @@ package de.juplo.demo.httpresources; -import de.juplo.httpresources.HttpResourceChainAwareResourceLoader; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; -import org.springframework.context.support.GenericApplicationContext; -import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; @@ -19,19 +16,6 @@ public class HttpResourcesDemoApplication return new HttpComponentsClientHttpRequestFactory(); } - @Bean - HttpResourceChainAwareResourceLoader resourceLoader( - GenericApplicationContext context, - String[] sources) { - HttpResourceChainAwareResourceLoader loader = - new HttpResourceChainAwareResourceLoader( - new PathMatchingResourcePatternResolver(), - sources - ); - context.setResourceLoader(loader); - return loader; - } - public static void main(String[] args) { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index dd14ca8..3f6cd82 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,7 +1,7 @@ server.port=8080 origin=http://localhost:8888 juplo.http-resources.protocol-resolver.enabled=true -spring.web.resources.static-locations"=classpath:/overwrite/,${origin},classpath:/fallback/ +spring.resources.static-locations"=classpath:/overwrite/,${origin},classpath:/fallback/ spring.thymeleaf.prefix=/ spring.thymeleaf.suffix=.html logging.level.de.juplo=DEBUG