From: Kai Moritz <kai@juplo.de>
Date: Mon, 20 Jun 2016 21:12:06 +0000 (+0200)
Subject: WIP: early 404-detection
X-Git-Tag: alt~9
X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=47ba6f9913adb987a0fda0e25e101ae34297d725;p=maven-thymeleaf-skin

WIP: early 404-detection
---

diff --git a/pom.xml b/pom.xml
index 7529bde..4a571c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,6 +33,7 @@
 
     <!-- used versions (not defined in spring-boot) -->
     <httpclient-spring-boot-starter.version>1.0-SNAPSHOT</httpclient-spring-boot-starter.version>
+    <thymeproxy.version>1.0-SNAPSHOT</thymeproxy.version>
 
   </properties>
 
@@ -46,6 +47,11 @@
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-thymeleaf</artifactId>
     </dependency>
+    <dependency>
+      <groupId>de.juplo</groupId>
+      <artifactId>thymeproxy</artifactId>
+      <version>${thymeproxy.version}</version>
+    </dependency>
     <dependency>
       <groupId>de.juplo</groupId>
       <artifactId>httpclient-spring-boot-starter</artifactId>
diff --git a/src/main/java/de/juplo/thymeproxy/Application.java b/src/main/java/de/juplo/thymeproxy/Application.java
index 9311cf8..6b0ad09 100644
--- a/src/main/java/de/juplo/thymeproxy/Application.java
+++ b/src/main/java/de/juplo/thymeproxy/Application.java
@@ -18,7 +18,7 @@ import org.springframework.core.env.Environment;
 import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver;
-import org.springframework.web.servlet.mvc.UrlFilenameViewController;
+import org.thymeleaf.TemplateEngine;
 import org.thymeleaf.resourceresolver.IResourceResolver;
 import org.thymeleaf.resourceresolver.UrlResourceResolver;
 import org.thymeleaf.templateresolver.TemplateResolver;
@@ -34,7 +34,7 @@ public class Application extends WebMvcConfigurerAdapter
   @Bean
   public RegexUrlHandlerMapping proxiedHandlerMapping(
       ProxyHttpRequestHandler proxy,
-      UrlFilenameViewController views
+      UrlThymeleafViewController views
       )
   {
     RegexUrlHandlerMapping mapping = new RegexUrlHandlerMapping();
@@ -63,9 +63,11 @@ public class Application extends WebMvcConfigurerAdapter
   }
 
   @Bean
-  public UrlFilenameViewController urlFilenameViewController()
+  public UrlThymeleafViewController urlThymeleafViewController(
+      TemplateEngine engine
+      )
   {
-    return new UrlFilenameViewController();
+    return new UrlThymeleafViewController(engine);
   }
 
   @Bean