1.匿名:access="ROLE_ANONYMOUS" ;
2.不验证:security="none";
3.表达式关闭:use-expres sions设置为"false"(博客有bug,表达式英文空个格);
4.登录action:变成了login;
5.登出action:变成了logout;
重点说一下儿CSRF,4.0默认支持CSRF,不关闭的话需要配置:
web.xml:
csrfFilter
org.springframework.web.filter.DelegatingFilterProxy
true
csrfFilter
/*
security.xml:
class="org.springframework.security.web.csrf.CsrfFilter">
class="org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository" />
class="org.springframework.security.web.servlet.support.csrf.CsrfRequestDataValueProcessor" />