How can I add adding configurations of type "error-page" to Spring MVC webapp using Java config? (No web.xml)?
<error-page> <error-code>404</error-code> <location>/errors/404</location> </error-page>
I would like to use such a configuration (in Java Config) to forward all uncaught exceptions to a specific controller method.
I was hoping to avoid the @ ControllerAdvice / @ ExceptionHandler configuration (which allows me to create a controller method that would handle ALL errors) because I would like Access Denied exceptions to continue to fall under Spring Security and just let the other exceptions be handled by my code.
It looks like a similar question was asked here: Spring JavaConfig not catching PageNotFound?
java spring-mvc
Dan
source share