我正在尝试使用mkyong示例编写我的测试弹簧安全应用程序.
Spring Security: 4.0.0.RC1
Spring: 4.1.4.RELEASE
我有以下安全配置:
access="hasRole('ADMIN')"/>
username-parameter="user"
password-parameter="password"
login-page="/"
default-target-url="/?OK"/>
登录页面:
User:
Password:
现在,当我尝试登录时,我得到403错误页面:
Invalid CSRF Token 'null' was found on the request parameter
'_csrf' or header 'X-CSRF-TOKEN'.
描述:
Access to the specified resource (Invalid CSRF Token 'null' was
found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'.) has been
forbidden.
怎么了,怎么解决这个问题?我在配置中评论了csrf,但错误消息与csrf有关.