From 1eedb8a57c2eb5c9953dcf058184ebdc6987fbf5 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 24 May 2022 15:14:21 +0800
Subject: [PATCH] Merge branch 'feature/订单服务单代码改造' into alpha
---
zq-erp/src/main/java/com/matrix/core/exception/GlobleExceptionResolver.java | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/core/exception/GlobleExceptionResolver.java b/zq-erp/src/main/java/com/matrix/core/exception/GlobleExceptionResolver.java
index 2ff87a7..15592ad 100644
--- a/zq-erp/src/main/java/com/matrix/core/exception/GlobleExceptionResolver.java
+++ b/zq-erp/src/main/java/com/matrix/core/exception/GlobleExceptionResolver.java
@@ -7,6 +7,8 @@
import com.matrix.system.common.bean.ProjException;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.common.dao.ProjExceptionDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;
@@ -27,6 +29,13 @@
private static final String TRUE = "true";
+ @Value("${is_open_exception_report}")
+ String isOpenExceptionReport;
+
+
+ @Value("${showExcptionUrl}")
+ String showExcptionUrl;
+
/**
* 忽略一些特定的异常
@@ -44,7 +53,7 @@
if (ex instanceof GlobleException) {
// 如果是内部全局异常
- LogUtil.warn("#程序抛出全局异常#", ex);
+ LogUtil.error("#程序抛出全局异常#", ex);
GlobleException globleException = (GlobleException) ex;
attr.put("status", globleException.getErrorCode());
attr.put("info", globleException.getMessage());
@@ -52,7 +61,7 @@
} else {
// 非内部异常
- LogUtil.error("#程序抛出未捕获异常#", ex);
+ LogUtil.error("#程序抛出未捕获异常#");
attr.put("status", 999999);
attr.put("info", InternationaUtil.getMesssge(SystemErrorCode.SYSTEM_UNKNOW_ERROR));
// 发送异常信息到管理群
@@ -78,15 +87,14 @@
* @email 935090232@qq.com
* @date 2018年5月9日
*/
- public static void sendNoticeToAdmin(Exception ex, String mdc, String requestUrl) {
+ public void sendNoticeToAdmin(Exception ex, String mdc, String requestUrl) {
String simpleMsg = ex.getMessage();
if (!EXCLUDE_EXCEPTION.contains(simpleMsg)) {
- String isOpenDingdingExceptionNotice = PropertiesUtil.getString("is_open_exception_report");
- String showExcptionUrl = PropertiesUtil.getString("showExcptionUrl");
+ String isOpenDingdingExceptionNotice =isOpenExceptionReport;
if (isOpenDingdingExceptionNotice != null && TRUE.equals(isOpenDingdingExceptionNotice)) {
--
Gitblit v1.9.1