From 79868862ded7c6d885a105ca02f41d4358ade8f3 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 16 Jun 2016 17:06:40 +0200 Subject: [PATCH] WIP: thymeproxy --- .../java/de/juplo/thymeproxy/Application.java | 22 ------------------- src/main/resources/application.properties | 4 +++- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/main/java/de/juplo/thymeproxy/Application.java b/src/main/java/de/juplo/thymeproxy/Application.java index dcc35f8..a9831ba 100644 --- a/src/main/java/de/juplo/thymeproxy/Application.java +++ b/src/main/java/de/juplo/thymeproxy/Application.java @@ -54,28 +54,6 @@ public class Application return new UrlFilenameViewController(); } - @Bean - public TemplateResolver defaultTemplateResolver( - IResourceResolver resources, - Environment env - ) - { - TemplateResolver resolver = new TemplateResolver(); - resolver.setResourceResolver(resources); - resolver.setPrefix("//thymeleaf/"); - resolver.setSuffix(".html"); - resolver.setTemplateMode("HTML5"); - resolver.setCharacterEncoding("UTF-8"); - resolver.setCacheable(Boolean.valueOf(env.getProperty("thymeproxy.cacheable"))); - return resolver; - } - - @Bean - public UrlResourceResolver thymeleafResourceResolver() - { - return new UrlResourceResolver(); - } - public static void main(String[] args) { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index c0d3372..92754df 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,7 +2,9 @@ thymeproxy.name=@thymeproxy.name@ thymeproxy.origin=@thymeproxy.origin@ server.port=@thymeproxy.port@ thymeproxy.ttl=@thymeproxy.ttl@ -thymeproxy.origins[0].uri=http://localhost:8080/thymeleaf/ +thymeproxy.origins[0].uri=http://localhost:8080 +thymeproxy.origins[0].prefix=/thymeleaf/ +thymeproxy.origins[0].suffix=.html thymeproxy.cacheable=@thymeproxy.cacheable@ logging.level.de.juplo=info -- 2.20.1