Helius
2021-05-14 6d0ddcd0ebfa8e17ecd0403f055e89b82c68cf41
src/main/java/com/xcong/excoin/common/aop/ExceptionCatchAspect.java
@@ -17,6 +17,7 @@
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.client.ResourceAccessException;
import javax.net.ssl.SSLException;
import javax.validation.ValidationException;
@@ -51,7 +52,7 @@
    @AfterThrowing(pointcut = "exceptionCatch()", throwing = "ex")
    public void afterThrows(JoinPoint jp, Exception ex) throws Exception {
        if (ex instanceof GlobalException || ex instanceof MethodArgumentNotValidException || ex instanceof ValidationException || ex instanceof DuplicateKeyException || ex instanceof BadCredentialsException || ex instanceof UsernameNotFoundException || ex instanceof SSLException) {
        if (ex instanceof ResourceAccessException || ex instanceof GlobalException || ex instanceof MethodArgumentNotValidException || ex instanceof ValidationException || ex instanceof DuplicateKeyException || ex instanceof BadCredentialsException || ex instanceof UsernameNotFoundException || ex instanceof SSLException) {
            throw ex;
        }
@@ -59,6 +60,10 @@
            throw ex;
        }
        if ("dev".equals(profiles)  || "test".equals(profiles)) {
            throw ex;
        }
        SysExceptionDetailEntity exceptionData = new SysExceptionDetailEntity();
        String exStr = printStackTraceToString(ex);
        ThreadPoolUtils.EXECUTOR.execute(new Runnable(){