Ok I created a the following class:
Code:
public class CaseInsensitivePathMatcher extends AntPathMatcher {
@Override
public boolean match(String pattern, String string) {
String test = pattern.replace("{state}", "*");
boolean match = super.match(test.toLowerCase(), string.toLowerCase());
System.out.println("pattern: " + test.toLowerCase() + " = " + "string: " + string.toLowerCase() + " " + match);
return match;
}
}
I then added this configuration to my spring-servlet.xml:
Code:
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="pathMatcher">
<bean class="com.symmetry.spring.CaseInsensitivePathMatcher"/>
</property>
</bean>
When the application is deployed I can see the output and a match is found. But when I change a character in the url from lower case to uppercase I get a 404 error.
Not sure where to go from here.