November 2017
Intermediate to advanced
542 pages
14h 24m
English
The next step in the configuration process is to create a Java configuration file representing all Spring Security components required to cover standard web requests.
Create a new Java file in the src/main/java/com/packtpub/springsecurity/configuration/ directory with the name SecurityConfig.java, and the following content. Among other things, the following file demonstrates user login requirements for every page in our application, provides a login page, authenticates the user, and requires the logged-in user to be associated with a role called USER for every URL element:
//src/main/java/com/packtpub/springsecurity/configuration/ SecurityConfig.java @Configuration @EnableWebSecurity ...
Read now
Unlock full access