freemarker中shiro常用标签:
<@shiro.guest>
<@shiro.user>
<shiro:hasRole name="administrator">
<shiro:hasAnyRoles name="admin,user,operator">
<shiro:hasPermission name="/order:*">
freemarker需要特别配置shiro的部分
@Override
public void afterPropertiesSet() throws IOException, TemplateException {
super.afterPropertiesSet();
this.getConfiguration().setSharedVariable("shiro", new ShiroTags());
注意:
WEBINF下src=“”直接访问是不可以的(踩坑)
<@shiro.guest>
<@shiro.user>
<shiro:hasRole name="administrator">
<shiro:hasAnyRoles name="admin,user,operator">
<shiro:hasPermission name="/order:*">
freemarker需要特别配置shiro的部分
@Override
public void afterPropertiesSet() throws IOException, TemplateException {
super.afterPropertiesSet();
this.getConfiguration().setSharedVariable("shiro", new ShiroTags());
注意:
WEBINF下src=“”直接访问是不可以的(踩坑)