WebSecurityConfigurer是Spring Security Config的一个概念模型接口,用于建模"Web安全配置器"这一概念模型。 WebSecurityConfigurer被设计用于配置某个构建目标为Filter的某个SecurityBuilder安全构建器,WebSecurityConfigurer自身并没有定义任何方法,但是它继承自接口SecurityConfigurer,表明这是一个"安全配置器",所以它也具有SecurityConfigurer所具备的初始化能力#init和构建能力#configure。
源代码版本 : Spring Security Config 5.1.4.RELEASE
package org.springframework.security.config.annotation.web; import javax.servlet.Filter; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.SecurityBuilder; import org.springframework.security.config.annotation.SecurityConfigurer; import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; /** * Allows customization to the WebSecurity. In most instances users will use * EnableWebSecurity and a create Configuration that extends * WebSecurityConfigurerAdapter which will automatically be applied to the * WebSecurity by the EnableWebSecurity annotation. * * @see WebSecurityConfigurerAdapter * * @author Rob Winch * @since 3.2 */ public interface WebSecurityConfigurer<T extends SecurityBuilder<Filter>> extends SecurityConfigurer<Filter, T> { }