Class WebSecurityConfigurerAdapter

  • All Implemented Interfaces:
    SecurityConfigurer<javax.servlet.Filter,​WebSecurity>, WebSecurityConfigurer<WebSecurity>

    public abstract class WebSecurityConfigurerAdapter
    extends java.lang.Object
    implements WebSecurityConfigurer<WebSecurity>
    Provides a convenient base class for creating a WebSecurityConfigurer instance. The implementation allows customization by overriding methods.

    Will automatically apply the result of looking up AbstractHttpConfigurer from SpringFactoriesLoader to allow developers to extend the defaults. To do this, you must create a class that extends AbstractHttpConfigurer and then create a file in the classpath at "META-INF/spring.factories" that looks something like: = sample.MyClassThatExtendsAbstractHttpConfigurer
    If you have multiple classes that should be added you can use "," to separate the values. For example: = sample.MyClassThatExtendsAbstractHttpConfigurer, sample.OtherThatExtendsAbstractHttpConfigurer
    See Also:
    • Constructor Detail

      • WebSecurityConfigurerAdapter

        protected WebSecurityConfigurerAdapter()
        Creates an instance with the default configuration enabled.
      • WebSecurityConfigurerAdapter

        protected WebSecurityConfigurerAdapter​(boolean disableDefaults)
        Creates an instance which allows specifying if the default configuration should be enabled. Disabling the default configuration should be considered more advanced usage as it requires more understanding of how the framework is implemented.
        disableDefaults - true if the default configuration should be disabled, else false