I'd like to configure Spring MVC to do the following for me:
If (a controller is not found
&& controller exist for requestURI with or without trailing slash) {
redirect 301 to other URI with or without trailing slash
} else {
return 404 error
}
The above should be done by spring, not by some web.xml filter since only spring can test whether a redirect makes sense, i.e. whether there is a controller to handle the redirected request.