Skip to Content
Former Member
Jan 05, 2015 at 02:44 PM

Exception Handler with @ControllerAdvice not being called


Hi, Using @ControllerAdvice annotation I want to handle Runtime exceptions globally in CustomExceptionHandler class. Below is an example

 public class CustomExceptionHandler
     public ModelAndView handleAllException(final Exception exception)

But this exception handler is not being called when application throws exception like null pointer. Please let me know If I am missing any configuration or I should change my approach. Thanks.