I am developing a REST service using SpringMVC, where I have @RequestMapping at class and method level.
This application is currently configured to return error-page js
If you're using spring 3.2 or later you can use a controller advice (@ControllerAdvice
) to deal with, amongst other things, mapping errors (404's). You can find documentation here. Take a look at section 17.11. You can use this, for example, to provide more detailed logging on why your request bindings aren't being matched for specific urls, or to simply return a more specific response than a generic 404.