config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java
@SuppressWarnings("unchecked")
	private <C extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity>> C getOrApply(
			C configurer) throws Exception {
		C existingConfig = (C) getConfigurer(configurer.getClass());
		if (existingConfig != null) {
			return existingConfig;
		}
		return apply(configurer);
	}
@SuppressWarnings("unchecked")
	private <C extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity>> C getOrApply(
			C configurer) throws Exception {
		C existingConfig = (C) getConfigurer(configurer.getClass());
		if (existingConfig != null) {
			return existingConfig;
		}
		return apply(configurer);
	}
If the {@link SecurityConfigurer} has already been specified get the original,
otherwise apply the new {@link SecurityConfigurerAdapter}.

@param configurer the {@link SecurityConfigurer} to apply if one is not found for
this {@link SecurityConfigurer} class.
@return the current {@link SecurityConfigurer} for the configurer passed in
@throws Exception