exception handling for filter in spring

后端 未结 7 877
既然无缘
既然无缘 2020-12-17 14:59

I am handling exceptions in spring using @ExceptionHandler. Any exception thrown by controller is caught using method annotated with @ExceptionHandler and action is taken ac

7条回答
  •  轮回少年
    2020-12-17 16:03

    Filters happens before controllers are even resolved so exceptions thrown from filters can't be caught by a Controller Advice.

    Filters are a part of the servlet and not really the MVC stack.

提交回复
热议问题