摘要: 1.在class注解上@ControllerAdvice 2.在方法上注解上@ExceptionHandler(value = Exception.class) 3.如果返回的是View,方法的返回值是ModelAndView;如果返回的是String或者是Json数据,那么需要在方法上添加@Res 阅读全文
posted @ 2018-04-13 14:47 袋子里的袋鼠 阅读(139) 评论(0) 推荐(0)