From 5b4b266dce808935d58a04d8f2190d3dc773fde9 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 28 May 2021 11:53:32 +0800
Subject: [PATCH] 20210528
---
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 c6ceec5..79f4c13 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() {
}
@@ -60,7 +63,7 @@
throw ex;
}
- if ("dev".equals(profiles)) {
+ if ("dev".equals(profiles) || "test".equals(profiles)) {
throw ex;
}
@@ -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());
--
Gitblit v1.9.1