You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: config/src/main/java/org/springframework/security/config/annotation/authentication/configuration/InitializeUserDetailsBeanManagerConfigurer.java
+13-17Lines changed: 13 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -70,34 +70,30 @@ public void configure(AuthenticationManagerBuilder auth) {
this.logger.warn("Global AuthenticationManager configured with an AuthenticationProvider bean. "
76
-
+ "UserDetailsService beans will not be used by Spring Security for automatically configuring username/password login. "
77
-
+ "Consider removing the AuthenticationProvider bean. "
78
-
+ "Alternatively, consider using the UserDetailsService in a manually instantiated DaoAuthenticationProvider. "
79
-
+ "If the current configuration is intentional, to turn off this warning, "
80
-
+ "increase the logging level of 'org.springframework.security.config.annotation.authentication.configuration.InitializeUserDetailsBeanManagerConfigurer' to ERROR");
81
-
}
73
+
if (beanNames.length == 0) {
82
74
return;
83
75
}
84
76
85
-
if (beanNames.length == 0) {
77
+
if (auth.isConfigured()) {
78
+
this.logger.warn("Global AuthenticationManager configured with an AuthenticationProvider bean. "
79
+
+ "UserDetailsService beans will not be used by Spring Security for automatically configuring username/password login. "
80
+
+ "Consider removing the AuthenticationProvider bean. "
81
+
+ "Alternatively, consider using the UserDetailsService in a manually instantiated DaoAuthenticationProvider. "
82
+
+ "If the current configuration is intentional, to turn off this warning, "
83
+
+ "increase the logging level of 'org.springframework.security.config.annotation.authentication.configuration.InitializeUserDetailsBeanManagerConfigurer' to ERROR");
86
84
return;
87
85
}
88
86
89
87
// Try to resolve a single candidate using the container's rules (@Primary,
Copy file name to clipboardExpand all lines: config/src/test/java/org/springframework/security/config/annotation/authentication/configuration/InitializeUserDetailsBeanManagerConfigurerTests.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -65,8 +65,8 @@ void whenMultipleUdsAndOneResolvableCandidate_thenPrimaryIsAutoWired() throws Ex
0 commit comments