config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurerAdapter.java
public UserDetailsService userDetailsServiceBean() throws Exception {
		AuthenticationManagerBuilder globalAuthBuilder = context
				.getBean(AuthenticationManagerBuilder.class);
		return new UserDetailsServiceDelegator(Arrays.asList(
				localConfigureAuthenticationBldr, globalAuthBuilder));
	}
public UserDetailsService userDetailsServiceBean() throws Exception {
		AuthenticationManagerBuilder globalAuthBuilder = context
				.getBean(AuthenticationManagerBuilder.class);
		return new UserDetailsServiceDelegator(Arrays.asList(
				localConfigureAuthenticationBldr, globalAuthBuilder));
	}
public UserDetailsService userDetailsServiceBean ( ) throws Exception { AuthenticationManagerBuilder globalAuthBuilder = context . getBean ( AuthenticationManagerBuilder . class ) ; return new UserDetailsServiceDelegator ( Arrays . asList ( localConfigureAuthenticationBldr , globalAuthBuilder ) ) ; }
Override this method to expose a {@link UserDetailsService} created from
{@link #configure(AuthenticationManagerBuilder)} as a bean. In general only the
following override should be done of this method:

<pre>
&#064;Bean(name = &quot;myUserDetailsService&quot;)
// any or no name specified is allowed
&#064;Override
public UserDetailsService userDetailsServiceBean() throws Exception {
return super.userDetailsServiceBean();
}
</pre>

To change the instance returned, developers should change
{@link #userDetailsService()} instead
@return the {@link UserDetailsService}
@throws Exception
@see #userDetailsService()
Override this method to expose a { @link UserDetailsService } created from { @link #configure ( AuthenticationManagerBuilder ) } as a bean . In general only the following override should be done of this method :