Spring 3.2 @ControllerAdvice Not Working

exception, spring-mvc

Solution

There is no extra configuration required. It should just work. Look at this link for more details. This provide very simple example:

- https://javabeat.net/exception-controlleradvice-spring-3-2/

- https://javabeat.net/controlleradvice-improvements-spring-4-0/

Problem

I am having trouble getting `@ControllerAdvice` to work. I updated my namespace location, which were 3.1 in my xml files. I moved the class with the controller to the same package as the controller. I am using 3.2.0 release jars. If I put the `@ExceptionHandler` annotation in the controller code, it works, but not in a separate class with the `@ControllerAdvice`. When the `@ControllerAdvice` class fails, I get my uncaught exception handler view. Anyone have ideas on how to trouble shoot this one?

Original source