通知异步发
This commit is contained in:
parent
a329100212
commit
0ab4b18420
@ -68,13 +68,15 @@ public class CustomExceptionHandle {
|
|||||||
@ExceptionHandler(value = Exception.class)
|
@ExceptionHandler(value = Exception.class)
|
||||||
public ApiResponse<String> handle(Exception e) {
|
public ApiResponse<String> handle(Exception e) {
|
||||||
LOGGER.error("系统异常 -> {}", e.getMessage(), e);
|
LOGGER.error("系统异常 -> {}", e.getMessage(), e);
|
||||||
NotifyFactory.to().sendTo(
|
new Thread(() -> {
|
||||||
new NotifyContent(
|
NotifyFactory.to().sendTo(
|
||||||
"帧途后台报错了!",
|
new NotifyContent(
|
||||||
e.getMessage() + "\n---\n请求主体:\n```\n" + getRequestAsText() + "\n```\n---\n错误栈:\n```\n" + getStackTrace(e) + "\n```"
|
"帧途后台报错了!",
|
||||||
),
|
e.getMessage() + "\n---\n请求主体:\n```\n" + getRequestAsText() + "\n```\n---\n错误栈:\n```\n" + getStackTrace(e) + "\n```"
|
||||||
"default_user"
|
),
|
||||||
);
|
"default_user"
|
||||||
|
);
|
||||||
|
}).start();
|
||||||
return ApiResponse.buildResult(BizCodeEnum.SERVER_UNKONWN_ERROR);
|
return ApiResponse.buildResult(BizCodeEnum.SERVER_UNKONWN_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user