From 5575818556096be1dadaf5ff356b5db4c832aaa2 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 26 May 2021 19:27:09 +0800
Subject: [PATCH] modify
---
src/main/java/com/xcong/excoin/common/aop/ExceptionCatchAspect.java | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/common/aop/ExceptionCatchAspect.java b/src/main/java/com/xcong/excoin/common/aop/ExceptionCatchAspect.java
index 4f838da..85e1226 100644
--- a/src/main/java/com/xcong/excoin/common/aop/ExceptionCatchAspect.java
+++ b/src/main/java/com/xcong/excoin/common/aop/ExceptionCatchAspect.java
@@ -46,6 +46,9 @@
@Value("${spring.profiles.active}")
private String profiles;
+ @Value("${app.project}")
+ private String projectName;
+
@Pointcut("execution(* com.xcong.excoin..*.*(..))")
public void exceptionCatch() {
}
@@ -72,7 +75,7 @@
try {
log.info("插入");
exceptionData.setCreateTime(new Date());
- exceptionData.setMachine(InetAddress.getLocalHost().getHostName() + "-" + profiles);
+ exceptionData.setMachine(projectName + "-" + InetAddress.getLocalHost().getHostName() + "-" + profiles);
exceptionData.setAddress(InetAddress.getLocalHost().getHostAddress());
exceptionData.setExceptionMsg(exStr);
exceptionData.setSimpleMsg(ex.getMessage());
@@ -84,7 +87,7 @@
} else {
msg = exStr;
}
- DingTalkUtils.sendMsg(profiles + "--" + ex.getMessage(), msg, exceptionData.getId());
+ DingTalkUtils.sendMsg(projectName + "-" +profiles + "--" + ex.getMessage(), msg, exceptionData.getId());
} catch (Exception e) {
log.error("exception aop", e);
}
--
Gitblit v1.9.1