config/src/main/java/org/springframework/security/config/annotation/authentication/builders/AuthenticationManagerBuilder.java
private <C extends UserDetailsAwareConfigurer<AuthenticationManagerBuilder, ? extends UserDetailsService>> C apply(
			C configurer) throws Exception {
		this.defaultUserDetailsService = configurer.getUserDetailsService();
		return (C) super.apply(configurer);
	}
private <C extends UserDetailsAwareConfigurer<AuthenticationManagerBuilder, ? extends UserDetailsService>> C apply(
			C configurer) throws Exception {
		this.defaultUserDetailsService = configurer.getUserDetailsService();
		return (C) super.apply(configurer);
	}
Captures the {@link UserDetailsService} from any {@link UserDetailsAwareConfigurer}
.

@param configurer the {@link UserDetailsAwareConfigurer} to capture the
{@link UserDetailsService} from.
@return the {@link UserDetailsAwareConfigurer} for further customizations
@throws Exception if an error occurs