调整不捕获异常
This commit is contained in:
parent
5f18184362
commit
7c2cf7e570
@ -8,6 +8,8 @@ import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;
|
||||
import org.springframework.security.oauth2.provider.ClientRegistrationException;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -41,7 +43,9 @@ public class ClientExceptionAspect {
|
||||
result = proceedingJoinPoint.proceed();
|
||||
} catch (Throwable e) {
|
||||
boolean exceptionFlag = e instanceof SystemException
|
||||
|| e instanceof AuthenticationException;
|
||||
|| e instanceof AuthenticationException
|
||||
|| e instanceof OAuth2Exception
|
||||
|| e instanceof ClientRegistrationException;
|
||||
if (!exceptionFlag) {
|
||||
new Thread(() -> {
|
||||
exceptionServiceImpl.writeThrowable(e);
|
||||
|
Loading…
Reference in New Issue
Block a user