Improve warning message

This commit is contained in:
Yanming Zhou 2024-08-30 08:55:00 +08:00 committed by Josh Cummings
parent add5c56136
commit f0f47b54ec

View File

@ -70,10 +70,11 @@ class InitializeUserDetailsBeanManagerConfigurer extends GlobalAuthenticationCon
if (auth.isConfigured()) { if (auth.isConfigured()) {
if (!userDetailsServices.isEmpty()) { if (!userDetailsServices.isEmpty()) {
this.logger.warn("Global AuthenticationManager configured with an AuthenticationProvider bean. " this.logger.warn("Global AuthenticationManager configured with an AuthenticationProvider bean. "
+ "UserDetailsService beans will not be used for username/password login. " + "UserDetailsService beans will not be used by Spring Security for automatically configuring username/password login. "
+ "Consider removing the AuthenticationProvider bean. " + "Consider removing the AuthenticationProvider bean. "
+ "Alternatively, consider using the UserDetailsService in a manually instantiated " + "Alternatively, consider using the UserDetailsService in a manually instantiated DaoAuthenticationProvider. "
+ "DaoAuthenticationProvider."); + "If the current configuration is intentional, to turn off this warning, "
+ "increase the logging level of 'org.springframework.security.config.annotation.authentication.configuration.InitializeUserDetailsBeanManagerConfigurer' to ERROR");
} }
return; return;
} }