@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.security;
@@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.security;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean ;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean ;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication ;
import org.springframework.security.config.BeanIds ;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity ;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter ;
@ -27,14 +28,14 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
@@ -27,14 +28,14 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
* { @link 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 { @link EnableWebSecurity } has already
* been added or if a bean with name springSecurityFilterChain has been configured by the
* user , this will back - off .
* been added or if a bean with name { @value BeanIds # SPRING_SECURITY_FILTER_CHAIN } has
* been configured by the user , this will back - off .
*
* @author Madhura Bhave
* @since 2 . 0 . 0
* /
@ConditionalOnBean ( WebSecurityConfigurerAdapter . class )
@ConditionalOnMissingBean ( name = "springSecurityFilterChain" )
@ConditionalOnMissingBean ( name = BeanIds . SPRING_SECURITY_FILTER_CHAIN )
@ConditionalOnWebApplication ( type = ConditionalOnWebApplication . Type . SERVLET )
@EnableWebSecurity
public class WebSecurityEnablerConfiguration {