From 0ca7bf5c850eaef852a6b49d4b94e8366deedb29 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Wed, 26 May 2021 15:03:51 +0800 Subject: [PATCH] 20210525 申诉 --- 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 4f838da..627682c 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