mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-06-25 14:37:40 +08:00
修复全局异常类bug
This commit is contained in:
@@ -38,6 +38,18 @@ public class GlobalException {
|
||||
return AjaxResult.failed(HttpEnum.SYSTEM_ERROR.getCode(), HttpEnum.SYSTEM_ERROR.getMsg());
|
||||
}
|
||||
|
||||
/**
|
||||
* 拦截自定义抛出异常
|
||||
*/
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
@ExceptionHandler(BaseException.class)
|
||||
@ResponseBody
|
||||
public AjaxResult handleException(BaseException e) {
|
||||
int code = e.getCode();
|
||||
String msg = e.getMsg();
|
||||
return AjaxResult.failed(code, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 拦截表单参数校验FROM
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user