From fb4c79d14a8b99bbc6b53ba936888b19ba7365ab Mon Sep 17 00:00:00 2001 From: llnancy Date: Tue, 15 Oct 2024 21:32:44 +0800 Subject: [PATCH] feat: use name --- .../mojian/web/advice/ExceptionHandlerConfiguration.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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(); }