November 2017
Intermediate to advanced
542 pages
14h 24m
English
The next step is to configure springSecurityFilterChain to intercept all requests by creating an implementation of AbstractSecurityWebApplicationInitializer. It is critical for springSecurityFilterChain to be declared first, to ensure the request is secured prior to any other logic being invoked. To ensure springSecurityFilterChain gets loaded first, we can use @Order(1) as shown in the following configuration:
//src/main/java/c/p/s/web/configuration/SecurityWebAppInitializer @Order(1) public class SecurityWebAppInitializer extends AbstractSecurityWebApplicationInitializer { public SecurityWebAppInitializer() { super(); } }
The SecurityWebAppInitializer class will automatically register the springSecurityFilterChain ...
Read now
Unlock full access