@Configuration
@ConditionalOnBean(org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.class)
@ConditionalOnMissingBean(name="springSecurityFilterChain")
@ConditionalOnWebApplication(type=SERVLET)
@EnableWebSecurity
public class WebSecurityEnablerConfiguration
extends Object
If there is a bean of type WebSecurityConfigurerAdapter, this adds the EnableWebSecurity
annotation. This will make sure that the annotation is present with default security auto-configuration and also if the user adds custom security and forgets to add the annotation. If EnableWebSecurity
has already been added or if a bean with name "springSecurityFilterChain" has been configured by the user, this will back-off.
- Since:
- 2.0.0