Exception handler in Spring MVC

前端 未结 3 1179
暖寄归人
暖寄归人 2020-12-13 07:12

I want to create an exception handler which will intercept all controllers in my project. Is that possible to do? Looks like I have to put a handler method in each controlle

3条回答
  •  有刺的猬
    2020-12-13 07:51

    An abstract class where you define the exception handlers will do. And then make your controllers inherit it.

提交回复
热议问题