阅读背景:

从不调用控制器中的Spring MVC @ExceptionHandler方法

来源:互联网 

I have a Spring MVC controller with some simple REST service requests. I would like to add some error handling when specific exceptions are thrown from my services, but I cannot get a handler method annotated with @ExceptionHandler to actually ever be called. Here is one service I am deliberately throwing an exception to try and get my handler method to take over. The handler method is never invoked and Spring just returns a 500 error to the calling client. Do you have any ideas on what I'm doing wrong?I have a Spring MVC controller with some simple




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: