更新时间:2022-06-09 00:03:25
在 Spring Security 4.x 中,登录 URL 已更改为 login
而不是 j_spring_security_check
,请参阅
In Spring Security 4.x login URL has changed to login
instead of j_spring_security_check
, see Migrating from Spring Security 3.x to 4.x (XML Configuration).
<form name='f'action="login" method='POST'>
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
<table>
<tbody>
<tr>
<td>User Name</td>
<td><input type="text" name="username" size="30" /></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="password" size="30" /></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="login" /></td>
</tr>
</tbody>
</table>
</form>