Helius
2021-05-27 229e0ec1a577d604f15ed9659d7c2f0cd7edf8cd
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);
                }