From 1d1c67b1565e50a5db350660e368cde7af1fe581 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 16 Jun 2016 13:43:24 +0200 Subject: [PATCH] WIP: proxy --- .../java/de/juplo/thymeproxy/Application.java | 3 +-- .../thymeproxy/RegexUrlHandlerMapping.java | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) 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; + } } -- 2.20.1