@Configuration public class WebSecurityConfiguration extends Object implements ImportAware, BeanClassLoaderAware
WebSecurity
to create the FilterChainProxy
that performs the web
based security for Spring Security. It then exports the necessary beans. Customizations
can be made to WebSecurity
by extending WebSecurityConfigurerAdapter
and exposing it as a Configuration
or implementing
WebSecurityConfigurer
and exposing it as a Configuration
. This
configuration is imported when using EnableWebSecurity
.EnableWebSecurity
,
WebSecurity
Constructor and Description |
---|
WebSecurityConfiguration() |
Modifier and Type | Method and Description |
---|---|
org.springframework.security.config.annotation.web.configuration.AutowiredWebSecurityConfigurersIgnoreParents |
autowiredWebSecurityConfigurersIgnoreParents(ConfigurableListableBeanFactory beanFactory) |
static DelegatingApplicationListener |
delegatingApplicationListener() |
WebInvocationPrivilegeEvaluator |
privilegeEvaluator()
Creates the
WebInvocationPrivilegeEvaluator that is necessary for the JSP
tag support. |
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setFilterChainProxySecurityConfigurer(ObjectPostProcessor<Object> objectPostProcessor,
List<SecurityConfigurer<javax.servlet.Filter,WebSecurity>> webSecurityConfigurers)
Sets the
<SecurityConfigurer<FilterChainProxy, WebSecurityBuilder>
instances used to create the web configuration. |
void |
setImportMetadata(AnnotationMetadata importMetadata) |
javax.servlet.Filter |
springSecurityFilterChain()
Creates the Spring Security Filter Chain
|
SecurityExpressionHandler<FilterInvocation> |
webSecurityExpressionHandler() |
@Bean public static DelegatingApplicationListener delegatingApplicationListener()
@Bean @DependsOn(value="springSecurityFilterChain") public SecurityExpressionHandler<FilterInvocation> webSecurityExpressionHandler()
@Bean(name="springSecurityFilterChain") public javax.servlet.Filter springSecurityFilterChain() throws Exception
Exception
@Bean @DependsOn(value="springSecurityFilterChain") public WebInvocationPrivilegeEvaluator privilegeEvaluator() throws Exception
WebInvocationPrivilegeEvaluator
that is necessary for the JSP
tag support.WebInvocationPrivilegeEvaluator
Exception
@Autowired(required=false) public void setFilterChainProxySecurityConfigurer(ObjectPostProcessor<Object> objectPostProcessor, @Value(value="#{@autowiredWebSecurityConfigurersIgnoreParents.getWebSecurityConfigurers()}") List<SecurityConfigurer<javax.servlet.Filter,WebSecurity>> webSecurityConfigurers) throws Exception
<SecurityConfigurer<FilterChainProxy, WebSecurityBuilder>
instances used to create the web configuration.objectPostProcessor
- the ObjectPostProcessor
used to create a
WebSecurity
instancewebSecurityConfigurers
- the
<SecurityConfigurer<FilterChainProxy, WebSecurityBuilder>
instances used to
create the web configurationException
@Bean public org.springframework.security.config.annotation.web.configuration.AutowiredWebSecurityConfigurersIgnoreParents autowiredWebSecurityConfigurersIgnoreParents(ConfigurableListableBeanFactory beanFactory)
public void setImportMetadata(AnnotationMetadata importMetadata)
setImportMetadata
in interface ImportAware
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware