diff --git a/docs/manual/src/docs/asciidoc/index.adoc b/docs/manual/src/docs/asciidoc/index.adoc index e1325c8ffb..edf016c176 100644 --- a/docs/manual/src/docs/asciidoc/index.adoc +++ b/docs/manual/src/docs/asciidoc/index.adoc @@ -468,7 +468,7 @@ import org.springframework.security.config.annotation.authentication.builders.*; import org.springframework.security.config.annotation.web.configuration.*; @EnableWebSecurity -public class SecurityConfig extends WebSecurityConfigurerAdapter { +public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { @@ -511,7 +511,7 @@ The next step is to register the `springSecurityFilterChain` with the war. This ==== AbstractSecurityWebApplicationInitializer without Existing Spring -If you are not using Spring or Spring MVC, you will need to pass in the `SecurityConfig` into the superclass to ensure the configuration is picked up. You can find an example below: +If you are not using Spring or Spring MVC, you will need to pass in the `WebSecurityConfig` into the superclass to ensure the configuration is picked up. You can find an example below: [source,java] ---- @@ -521,7 +521,7 @@ public class SecurityWebApplicationInitializer extends AbstractSecurityWebApplicationInitializer { public SecurityWebApplicationInitializer() { - super(SecurityConfig.class); + super(WebSecurityConfig.class); } } ---- @@ -529,7 +529,7 @@ public class SecurityWebApplicationInitializer The `SecurityWebApplicationInitializer` will do the following things: * Automatically register the springSecurityFilterChain Filter for every URL in your application -* Add a ContextLoaderListener that loads the <>. +* Add a ContextLoaderListener that loads the <>. ==== AbstractSecurityWebApplicationInitializer with Spring MVC @@ -545,7 +545,7 @@ public class SecurityWebApplicationInitializer } ---- -This would simply only register the springSecurityFilterChain Filter for every URL in your application. After that we would ensure that `SecurityConfig` was loaded in our existing ApplicationInitializer. For example, if we were using Spring MVC it would be added in the `getRootConfigClasses()` +This would simply only register the springSecurityFilterChain Filter for every URL in your application. After that we would ensure that `WebSecurityConfig` was loaded in our existing ApplicationInitializer. For example, if we were using Spring MVC it would be added in the `getRootConfigClasses()` [[message-web-application-inititializer-java]] [source,java] @@ -555,7 +555,7 @@ public class MvcWebApplicationInitializer extends @Override protected Class[] getRootConfigClasses() { - return new Class[] { SecurityConfig.class }; + return new Class[] { WebSecurityConfig.class }; } // ... other overrides ... @@ -565,7 +565,7 @@ public class MvcWebApplicationInitializer extends [[jc-httpsecurity]] === HttpSecurity -Thus far our <> only contains information about how to authenticate our users. How does Spring Security know that we want to require all users to be authenticated? How does Spring Security know we want to support form based authentication? The reason for this is that the `WebSecurityConfigurerAdapter` provides a default configuration in the `configure(HttpSecurity http)` method that looks like: +Thus far our <> only contains information about how to authenticate our users. How does Spring Security know that we want to require all users to be authenticated? How does Spring Security know we want to support form based authentication? The reason for this is that the `WebSecurityConfigurerAdapter` provides a default configuration in the `configure(HttpSecurity http)` method that looks like: [source,java] ----