Class SecurityConfigurerAdapter<O,B extends SecurityBuilder<O>> 
java.lang.Object
org.springframework.security.config.annotation.SecurityConfigurerAdapter<O,B> 
- Type Parameters:
- O- The Object being built by B
- B- The Builder that is building O and is configured by- SecurityConfigurerAdapter
- All Implemented Interfaces:
- SecurityConfigurer<O,- B> 
- Direct Known Subclasses:
- AbstractHttpConfigurer,- LdapAuthenticationProviderConfigurer,- UserDetailsAwareConfigurer
public abstract class SecurityConfigurerAdapter<O,B extends SecurityBuilder<O>> 
extends Object
implements SecurityConfigurer<O,B> 
A base class for 
SecurityConfigurer that allows subclasses to only implement
 the methods they are interested in. It also provides a mechanism for using the
 SecurityConfigurer and when done gaining access to the SecurityBuilder
 that is being configured.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor) Deprecated, for removal: This API element is subject to removal in a future version.voidaddObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor) Adds anObjectPostProcessorto be used for thisSecurityConfigurerAdapter.and()Deprecated, for removal: This API element is subject to removal in a future version.For removal in 7.0.voidConfigure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.protected final BGets theSecurityBuilder.voidInitialize theSecurityBuilder.protected <T> TpostProcess(T object) Performs post processing of an object.voidsetBuilder(B builder) Sets theSecurityBuilderto be used.
- 
Constructor Details- 
SecurityConfigurerAdapterpublic SecurityConfigurerAdapter()
 
- 
- 
Method Details- 
initDescription copied from interface:SecurityConfigurerInitialize theSecurityBuilder. Here only shared state should be created and modified, but not properties on theSecurityBuilderused for building the object. This ensures that theSecurityConfigurer.configure(SecurityBuilder)method uses the correct shared objects when building. Configurers should be applied here.- Specified by:
- initin interface- SecurityConfigurer<O,- B extends SecurityBuilder<O>> 
- Throws:
- Exception
 
- 
configureDescription copied from interface:SecurityConfigurerConfigure theSecurityBuilderby setting the necessary properties on theSecurityBuilder.- Specified by:
- configurein interface- SecurityConfigurer<O,- B extends SecurityBuilder<O>> 
- Throws:
- Exception
 
- 
andDeprecated, for removal: This API element is subject to removal in a future version.For removal in 7.0. Use the lambda based configuration instead.Return theSecurityBuilderwhen done using theSecurityConfigurer. This is useful for method chaining.- Returns:
- the SecurityBuilderfor further customizations
 
- 
getBuilderGets theSecurityBuilder. Cannot be null.- Returns:
- the SecurityBuilder
- Throws:
- IllegalStateException- if- SecurityBuilderis null
 
- 
postProcessprotected <T> T postProcess(T object) Performs post processing of an object. The default is to delegate to theObjectPostProcessor.- Parameters:
- object- the Object to post process
- Returns:
- the possibly modified Object to use
 
- 
addObjectPostProcessorAdds anObjectPostProcessorto be used for thisSecurityConfigurerAdapter. The default implementation does nothing to the object.- Parameters:
- objectPostProcessor- the- ObjectPostProcessorto use
 
- 
addObjectPostProcessor@Deprecated(since="6.4", forRemoval=true) public void addObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor) Deprecated, for removal: This API element is subject to removal in a future version.
- 
setBuilderSets theSecurityBuilderto be used. This is automatically set when usingAbstractConfiguredSecurityBuilder.apply(SecurityConfigurerAdapter)- Parameters:
- builder- the- SecurityBuilderto set
 
 
-