部分不需要打印具体的 异常

This commit is contained in:
2025-11-13 16:40:00 +08:00
parent c3a0edc72b
commit 6ef2e022a6

View File

@@ -49,7 +49,8 @@ public class CzgControllerAdvice {
@ExceptionHandler(value = ApiNotPrintException.class)
@ResponseStatus(HttpStatus.OK)
public CzgResult<Object> apiNotPrintErrorHandler(ApiNotPrintException ex) {
setErrorLog(ex);
// setErrorLog(ex);
log.error("校验异常:{}", ex.getMessage());
return CzgResult.failure(ex.getMessage());
}
@@ -121,7 +122,7 @@ public class CzgControllerAdvice {
@ExceptionHandler(MissingServletRequestParameterException.class)
public CzgResult<Object> handleMissingServletRequestParameterException(MissingServletRequestParameterException ex) {
log.error("传参错误", ex);
log.error("传参错误:{}", ex.getMessage());
return CzgResult.failure(CzgRespCode.SYSTEM_ERROR.getCode(), "系统繁忙,请稍后再试");
}