在页面中引入标签库:
< %@ taglib prefix ="sec" uri ="http://www.springframework.org/security/tags" % >
使用标签库的示例:
< sec:authentication property ="principal" var ="authentication" />
< sec:authorize ifAllGranted ="ROLE_USER" > 可以访问 </ sec:authorize >
用户名:${authentication.username } < br />
IS_AUTHENTICATED_FULLY:是则满足以下情况返回通过:
**.既不是RememberMeAuthentication也不是AnonymousAuthenticationToken的实例
IS_AUTHENTICATED_REMEMBERED:是则满足以下任一情况返回通过:
a*.Authentication是RememberMeAuthenticationToken的实例
b*.既不是RememberMeAuthentication也不是AnonymousAuthenticationToken的实例
IS_AUTHENTICATED_ANONYMOUSLY:是则满足以下任一情况返回通过:
a*.Authentication是AnonymousAuthenticationToken的实例
b*.既不是RememberMeAuthentication也不是AnonymousAuthenticationToken的实例
c*.Authentication是RememberMeAuthenticationToken的实例
原文:http://www.cnblogs.com/haore147/p/5213525.html