The following simple solution should make @RequestMapping insensitive, whether it annotates a Controller or a method. Biju's solution should work too.
Create this custom HandlerMapping :
public CaseInsensitiveAnnotationHandlerMapping extends DefaultAnnotationHandlerMapping {
@Override
protected Object lookupHandler(String urlPath, HttpServletRequest request)
throws Exception {
return super.lookupHandler(urlPath.toLowerCase(), request);
}
@Override
protected void registerHandler(String urlPath, Object handler)
throws BeansException, IllegalStateException {
super.registerHandler(urlPath.toLowerCase(), handler);
}
}
And add this in your [servlet-name]-servlet.xml :
Note: if you don't want two HandlerMapping in your app, you may want to remove (it instantiates a DefaultAnnotationHandlerMapping).