From 829f629756e5402bcd3e9f6ef1f9c6dbffbabb11 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Wed, 17 Apr 2024 14:46:29 +0800
Subject: [PATCH] 55测试环境

---
 src/main/java/com/xcong/excoin/common/aop/ExceptionCatchAspect.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 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 d738caf..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() {
     }
@@ -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