调整不捕获异常
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.aspectj.lang.annotation.Pointcut;
|
||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.security.core.AuthenticationException;
|
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 org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -41,7 +43,9 @@ public class ClientExceptionAspect {
|
|||||||
result = proceedingJoinPoint.proceed();
|
result = proceedingJoinPoint.proceed();
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
boolean exceptionFlag = e instanceof SystemException
|
boolean exceptionFlag = e instanceof SystemException
|
||||||
|| e instanceof AuthenticationException;
|
|| e instanceof AuthenticationException
|
||||||
|
|| e instanceof OAuth2Exception
|
||||||
|
|| e instanceof ClientRegistrationException;
|
||||||
if (!exceptionFlag) {
|
if (!exceptionFlag) {
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
exceptionServiceImpl.writeThrowable(e);
|
exceptionServiceImpl.writeThrowable(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user