![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shiro
chen1218chen
生活最美好的三件事:学习新的知识,欣赏陌生的风景,结交新的朋友 , 个人博客地址http://chen1218chen.github.io/
展开
-
shiro角色配置
角色验证数据库表rolesuserindexjsp配置文件myRealm角色验证数据库表tuser:用户表 uid + uname + upassword roles:角色表 rid + rnameuser_to_role:用户角色表,hibernate会自动建立 user_id + role_idroles@Entity@Table(name = "roles",原创 2016-07-05 16:17:21 · 5347 阅读 · 2 评论 -
shiro入门配置
基础配置使用shiro的步骤 1. 导入JAR包 2. web.xml配置 <!-- Shiro配置 --> <filter> <filter-name>shiroFilter</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilter原创 2016-07-05 16:31:09 · 327 阅读 · 0 评论 -
shiro实现SSL登陆
个人主页,技术杂谈原文链接考虑项目安全需求,将http请求转为https,项目中已集成的shiro框架已实现SSL登陆,来看下具体实现吧。tomcat的server.xml文件配置。将http的8080端口调转到https的8443端口<Connector acceptCount="500" connectionTimeout="20000" enableLookups="false" maxThr原创 2017-06-20 09:28:45 · 2528 阅读 · 0 评论 -
shiro之roles实现or关系的角色过滤
个人主页,欢迎来访原文链接roles参数可以写多个,多个时必须加上引号,并且参数之间用逗号分割,当有多个参数时,每个参数通过才算通过,相当于hasAllRoles()方法。shiro的角色过滤是and的关系。而最近根据项目需求,要求订阅号管理模块,多个角色都可以进行管理,角色的过滤非and关系而是or的关系,applicationContext.xml中roles[“管理员”,”订阅号”]不能实现或原创 2017-06-20 09:32:57 · 6075 阅读 · 0 评论