|
|
@@ -33,7 +33,7 @@ public class GlobalExceptionHandle {
|
|
|
CommonException e = (CommonException) exception;
|
|
|
response.setCode(e.getCode());
|
|
|
response.setMsg(e.getMsg());
|
|
|
- LOGGER.info("uri:" + uri + "\n" + "CustomException log.", exception, exception.getMessage());
|
|
|
+ LOGGER.info("uri:" + uri + "\n" + "CustomException log.", exception);
|
|
|
} else if (exception instanceof MethodArgumentNotValidException) {
|
|
|
// 参数校验异常
|
|
|
MethodArgumentNotValidException e = (MethodArgumentNotValidException) exception;
|
|
|
@@ -47,7 +47,7 @@ public class GlobalExceptionHandle {
|
|
|
}
|
|
|
response.setCode(ExceptionEnum.PARAM_ERROR.getCode());
|
|
|
response.setMsg(errorMsg.toString());
|
|
|
- LOGGER.error("uri:" + uri + "\n" + "MethodArgumentNotValidException log.", exception, exception.getMessage());
|
|
|
+ LOGGER.error("uri:" + uri + "\n" + "MethodArgumentNotValidException log.", exception);
|
|
|
} else if (exception instanceof BindException) {
|
|
|
// 参数绑定异常
|
|
|
BindException e = (BindException) exception;
|
|
|
@@ -61,11 +61,11 @@ public class GlobalExceptionHandle {
|
|
|
}
|
|
|
response.setCode(ExceptionEnum.PARAM_ERROR.getCode());
|
|
|
response.setMsg(errorMsg.toString());
|
|
|
- LOGGER.error("uri:" + uri + "\n" + "BindException log.", exception, exception.getMessage());
|
|
|
+ LOGGER.error("uri:" + uri + "\n" + "BindException log.", exception);
|
|
|
} else {
|
|
|
response.setCode(ExceptionEnum.SYSTEM_ERROR.getCode());
|
|
|
response.setMsg(ExceptionEnum.SYSTEM_ERROR.getMsg());
|
|
|
- LOGGER.error("uri:" + uri + "\n" + "unknownException log.", exception, exception.getMessage());
|
|
|
+ LOGGER.error("uri:" + uri + "\n" + "unknownException log.", exception);
|
|
|
}
|
|
|
return response;
|
|
|
}
|