KKSU
2024-04-17 829f629756e5402bcd3e9f6ef1f9c6dbffbabb11
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());