Customizing the certification Process 1. Customizing the login page 1.1 modifying the security profile
The security default has a form login page. If we do not specify it will jump to the default up. Since the page does not meet our development needs, we need to customize a page.
When we define what authentication method to use when intercepting HTTP requests, we can specify a login page.
1.2 Create an HTML page under the resource resource bundle
1.3 Access to the browser.
When we visit the browser task page, we get an error. The error is too many hops.
Cause of error: When we enter a page in the browser, security will intercept it. and jump to the login page specified above. However, security will also intercept this login page and jump to the login page again. So it causes a dead loop.
Workaround: Need to modify the content of security at a time
Set a match to match on this login page. and set his permissions to be accessible to everyone. This will solve the problem.
1.4 Modifying the contents of the login page
Add the form form to the login page and set the access path.
2. Custom login successfully processed 3. Custom Login Failure Handling
From for notes (Wiz)
Tian Shi Spring Security Tutorial Chapter II: Customizing the Login certification process