diff --git a/mojian-web/mojian-web-advice/src/main/java/io/github/llnancy/mojian/web/advice/ExceptionHandlerConfiguration.java b/mojian-web/mojian-web-advice/src/main/java/io/github/llnancy/mojian/web/advice/ExceptionHandlerConfiguration.java index d50d44c..bfdda00 100644 --- a/mojian-web/mojian-web-advice/src/main/java/io/github/llnancy/mojian/web/advice/ExceptionHandlerConfiguration.java +++ b/mojian-web/mojian-web-advice/src/main/java/io/github/llnancy/mojian/web/advice/ExceptionHandlerConfiguration.java @@ -11,7 +11,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; -import org.springframework.security.core.AuthenticationException; /** * {@link IExceptionHandler} configuration @@ -27,7 +26,7 @@ public BindExceptionHandler bindExceptionHandler() { } @Bean - @ConditionalOnClass({AuthenticationException.class}) + @ConditionalOnClass(name = {"org.springframework.security.core.AuthenticationException"}) public AuthenticationExceptionHandler authenticationExceptionHandler() { return new AuthenticationExceptionHandler(); }