This commit is contained in:
2025-04-05 13:21:52 +08:00
parent 67dca0d4d4
commit 0ab142e1c4
19 changed files with 215 additions and 337 deletions

View File

@ -74,14 +74,6 @@ public class CustomExceptionHandle {
@ExceptionHandler(value = Exception.class)
public ApiResponse<String> handle(Exception e) {
LOGGER.error("系统异常 -> {}", e.getMessage(), e);
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if (attributes != null) {
try {
HttpSaver.saveRequestToFile(attributes.getRequest());
} catch (IOException ex) {
LOGGER.error("保存请求信息失败 -> {}", e.getMessage(), e);
}
}
return ApiResponse.buildResult(BizCodeEnum.SERVER_UNKONWN_ERROR);
}