config/src/main/java/org/springframework/security/config/annotation/AbstractConfiguredSecurityBuilder.java
public <C extends SecurityConfigurer<O, B>> C apply(C configurer) throws Exception {
		add(configurer);
		return configurer;
	}
public <C extends SecurityConfigurer<O, B>> C apply(C configurer) throws Exception {
		add(configurer);
		return configurer;
	}
Applies a {@link SecurityConfigurer} to this {@link SecurityBuilder} overriding any
{@link SecurityConfigurer} of the exact same class. Note that object hierarchies
are not considered.

@param configurer
@return the {@link SecurityConfigurerAdapter} for further customizations
@throws Exception