@RestControllerAdvice+@ExceptionHandler 失效
原因
在一个AOP切面里面,try{}catch{},异常被拦截消费了 我的解决方案是在catch里判断如果是我门自己自定义的异常 再throw出去,这样统一异常处理的地方就可以实现了。
try {
log.info("request methodName: " + methodName);
log.info("request URL: " + request.getRequestURL());
log.info("request params: " + JSONObject.toJSONS.
原创
2020-06-28 10:48:12 ·
906 阅读 ·
0 评论