码迷,mamicode.com
首页 > 其他好文 > 详细

Shiro权限总结

时间:2018-08-24 22:58:20      阅读:185      评论:0      收藏:0      [点我收藏+]

标签:creat   index   地址   spring   ati   href   .sh   配置   https   

 参考学习地址    shiro 瞅完就会用(ssm+shiro)      Spring Shiro配置实现用户认证和授权 

anon:它对应的过滤器里面是空的,什么都没做,另外.do和.jsp后面的*表示参数,比方说[login.jsp?main]这种

authc:该过滤器下的页面必须验证后才能访问,它是内置的org.apache.shiro.web.filter.authc.FormAuthenticationFilter

注意:对于相似的资源,需要将anon的设置放在authc前面,anon才会生效,因为Shiro是从上往下匹配URL的,匹配成功便不再匹配了
 
 

/index?=authc //`?`通配符,表示一个字符,如/index1 /indexa /index- (不能匹配/index) ,
/index*=authc `*`通配符,表示零个或一个或多个字符,如/index1213asd /index /index2
/index/**=authc `**`表示匹配零个或一个或多个路径,如/index/create /index/create/update/...
/index*/**authc 可以匹配 /index12/create/update/...

Shiro权限总结

标签:creat   index   地址   spring   ati   href   .sh   配置   https   

原文地址:https://www.cnblogs.com/duanwandao/p/9532204.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!