|
|
@@ -18,9 +18,8 @@ public class ExceptionCatch { |
|
|
|
*/ |
|
|
|
@ExceptionHandler(Exception.class) |
|
|
|
@ResponseBody |
|
|
|
public JsonResult exception(Exception e){ |
|
|
|
e.printStackTrace(); |
|
|
|
log.error("catch exception:{}",e.getMessage()); |
|
|
|
public JsonResult<Object> exception(Exception e){ |
|
|
|
log.error("系统异常,异常信息:{}", e.getMessage()); |
|
|
|
return JsonResult.error(e.getMessage()); |
|
|
|
} |
|
|
|
|
|
|
@@ -31,7 +30,7 @@ public class ExceptionCatch { |
|
|
|
*/ |
|
|
|
@ExceptionHandler(ServiceException.class) |
|
|
|
@ResponseBody |
|
|
|
public JsonResult exception(ServiceException e){ |
|
|
|
public JsonResult<Object> exception(ServiceException e){ |
|
|
|
log.error("catch exception:{}",e.getMessage()); |
|
|
|
return JsonResult.error(e.getMessage()); |
|
|
|
} |