The spring security reference explains it as follows.
The Java Configuration equivalent of closing an XML tag is expressed
using the and() method which allows us to continue configuring the
parent. If you read the code it also makes sense. I want to configure
authorized requests and configure form login and configure HTTP Basic
authentication.
Accordingly, you say the following with your own settings:
- Ensures that any request to our application requires the user to be authenticated,
- Allows authentication for some links only to the specified role,
- Allows users to authenticate with form based login.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…