From: Kai Moritz Date: Thu, 16 Jun 2016 11:43:24 +0000 (+0200) Subject: WIP: proxy X-Git-Tag: alt~30 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=1d1c67b1565e50a5db350660e368cde7af1fe581;p=maven-thymeleaf-skin WIP: proxy --- diff --git a/src/main/java/de/juplo/thymeproxy/Application.java b/src/main/java/de/juplo/thymeproxy/Application.java index 8a49695..a12205e 100644 --- a/src/main/java/de/juplo/thymeproxy/Application.java +++ b/src/main/java/de/juplo/thymeproxy/Application.java @@ -7,14 +7,13 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.core.Ordered; import org.springframework.core.env.Environment; -import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; @SpringBootApplication public class Application { @Bean - public SimpleUrlHandlerMapping proxiedHandlerMapping( + public RegexUrlHandlerMapping proxiedHandlerMapping( ProxyHttpRequestHandler handler ) { diff --git a/src/main/java/de/juplo/thymeproxy/RegexUrlHandlerMapping.java b/src/main/java/de/juplo/thymeproxy/RegexUrlHandlerMapping.java index c7e52b4..9c27b43 100644 --- a/src/main/java/de/juplo/thymeproxy/RegexUrlHandlerMapping.java +++ b/src/main/java/de/juplo/thymeproxy/RegexUrlHandlerMapping.java @@ -1,16 +1,23 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ package de.juplo.thymeproxy; +import org.springframework.util.PathMatcher; +import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; + + + /** * * @author kai */ -public class RegexUrlHandlerMapping +public class RegexUrlHandlerMapping extends SimpleUrlHandlerMapping { - + private final RegexPathMatcher matcher = new RegexPathMatcher(); + + + @Override + public PathMatcher getPathMatcher() + { + return matcher; + } }