异常信息处理

This commit is contained in:
2025-11-06 20:14:01 +08:00
parent e1ad2d959c
commit 966dbe6a81
5 changed files with 162 additions and 171 deletions

View File

@@ -65,6 +65,9 @@ public class GlobalExceptionHandler
{
log.error(e.getMessage(), e);
Integer code = e.getCode();
if(code == null){
code = HttpStatus.ERROR;
}
response.setStatus(code);
return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage());
}