shiro权限定义的三种方法
1.在配置文件中定义
<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager"/>
<property name="loginUrl" value="/index.jsp" /> <!-- 没有认证返回地址 -->
<property name="unauthorizedUrl" value="/index2.jsp" /> <!-- 没有授权返回地址 -->
<property name="filterChainDefinitions">
<value> <!-- **代表任意子目录 -->
/login/** = anon
/user/** = authc,roles[admin]
/test/** = authc,perms[测试用的lkkk]
</value>
</property>
</bean>
2.在数据库中定义
<bean id="chainDefinitionSectionMetaSource" class="com.fyh.www.shiro.ChainDefinitionSectionMetaSource">
<property name="filterChainDefinitions"> <!-- 定义默认的url权限 -->
<value>
/login/** = anon
</value>
</property>
</bean> <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager"/>
<property name="loginUrl" value="/index.jsp" /> <!-- 没有认证返回地址 -->
<property name="unauthorizedUrl" value="/index2.jsp" /> <!-- 没有授权返回地址 -->
<property name="filterChainDefinitionMap" ref="chainDefinitionSectionMetaSource"/>
</bean>
Resource.java(数据库对应的pojo)
public class Resource implements Serializable {
/**
* id
*/
private Integer id; /**
* url
*/
private String value; /**
* 所需权限
*/
private String permission;
//-----------------------getter/setter方法---------------------------//
ChainDefinitionSectionMetaSource.java(加载pojo)
} public class ChainDefinitionSectionMetaSource implements FactoryBean<Ini.Section> { @Autowired
private ResourceDao resourceDao; private String filterChainDefinitions; /**
* 默认premission 字符串格式模板
*/
public static final String PREMISSION_STRING="perms[\"{0}\"]"; @Override
public Section getObject() throws Exception {
//获取所有Resource
List<Resource> list = resourceDao.getAll();
Ini ini = new Ini();
//加载默认的url
ini.load(filterChainDefinitions);
Ini.Section section = ini.getSection(Ini.DEFAULT_SECTION_NAME);
//循环Resource 的url,逐个添加到section 中。section 就是filterChainDefinitionMap,
//里面的键就是链接URL,值就是存在什么条件才能访问该链接
for (Iterator<Resource> it = list.iterator(); it.hasNext();) {
Resource resource = it.next();
//如果不为空值添加到section 中
if(StringUtils.isNotEmpty(resource.getValue()) &&
StringUtils.isNotEmpty(resource.getPermission())) {
section.put(resource.getValue(),MessageFormat.format(PREMISSION_STRING,resource.getPermission()));
}
}
return section;
} /**
* 通过filterChainDefinitions 对默认的url 过滤定义 *
*
* @param filterChainDefinitions 默认的url 过滤定义
*
*/
public void setFilterChainDefinitions(String filterChainDefinitions) {
this.filterChainDefinitions = filterChainDefinitions;
} @Override
public Class<?> getObjectType() {
// TODO Auto-generated method stub
return null;
} @Override
public boolean isSingleton() {
// TODO Auto-generated method stub
return false;
} }
dao接口
@Repository
public interface ResourceDao { public List<Resource> getAll();
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fyh.www.dao.shiro.ResourceDao" >
<resultMap id="BaseResultMap" type="com.fyh.www.pojo.shiro.Resource" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="value" property="value" jdbcType="VARCHAR" />
<result column="permission" property="permission" jdbcType="VARCHAR" />
</resultMap> <select id="getAll" resultMap="BaseResultMap" >
select
id,value,permission
from TB_RESOURCE
</select> </mapper>
数据库结构
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtoAAACnCAIAAACgr2xSAAAgAElEQVR4nO2deVwUR97/K/cmu/tsnn32eTb72002utlsNsdmhcCqmxg1nklMYhIjinfUxGRVEqNGBQW5vU88YJQBRRC8uWFAjhkY5D7lGO77mh4YlEaY+f3R0DQz3T0998B836/Pi1dPdVV1fbuquz5T0zMgpSYaGhowCps2bcLGEhgYWK89TU1Nly9fbmxslMvlvQAAAAAAWDHIIHakhTPNI7S3t/v5+fX19fX2ynt7e3t6RiWT9chkPdQUEAgEAoFAE1iGsSNtY2lvbyc2uru7ZTJZd3d3mxpdXV1nzpyRy/t6e3tlMhkGAAAAAIC1YkQ7QniRJUuWyGQyJjv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(添加如下配置文件)
<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"
depends-on="lifecycleBeanPostProcessor">
</bean>
<bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
<property name="securityManager" ref="securityManager"/>
</bean>
@Controller
@RequestMapping(value = "/test")
public class TestController { @RequestMapping(value = "/test.action")
public String test(Model model) {
return SysContant.FRONT_PAGE+"NewFile1";
} @RequestMapping("/test2")
@RequiresPermissions("account:create")
public String testAnnotation(){ return SysContant.FRONT_PAGE+"NewFile1";
} }
可是为什么不生效呢,今天我就来说说这事儿。
我们知道Shiro的注解授权是利有Spring的AOP实现的。在程序启动时会自动扫描作了注解的Class,当发现注解时,就自动注入授权代码实现。也就是说,要注入授权控制代码,第一处必须要让框架要可以扫描找被注解的Class 。
applicationContext.xml一般配置注解扫描将@controller注解拉入黑名单
<context:component-scan base-package="com.fyh.www" >
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
apringmvc.xml中配置注解扫描一般只扫描@controller注解
<context:component-scan base-package="com.fyh.www.controller" use-default-filters="false">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
而我们的Srping项目在ApplicationContext.xml中一般是不扫描Controller的,所以也就无法让写在Controller中的注解授权生效了。因此正确的作法是将这配置放到springmvc的配置文件中.这样Controller就可以通过注解授权了。
不过问题来了,通过上面的配置Controller是可以通过注解授权了,但是Services中依然不能通过注解授权。虽然说,如果我们在Controller控制了授权,那么对于内部调用的Service层就可以不再作授权,
但也有例外的情况,比如Service除了给内部Controller层调用,还要供远程SOAP调用,那么就需要对Service进行授权控制了。同时要控制Controller和Service,那么采用相同的方式,我们可以在ApplicationContext.xml中配置类同的配置,以达到相同的效果。
applicationContext.xml中的配置为:
<bean id="serviceAdvisorAutoProxyCreator" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"/>
<bean id="serviceAuthorizationAttributeSourceAdvisor" class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
<property name="securityManager" ref="securityManager"/>
</bean>
apringmvc.xml中的配置为:
<bean id="controllerAdvisorAutoProxyCreator" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"
depends-on="lifecycleBeanPostProcessor"/>
<bean id="controllerAuthorizationAttributeSourceAdvisor" class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
<property name="securityManager" ref="securityManager"/>
</bean>
此时,我们在同一个项目中配置了两个,DefaultAdvisorAutoProxyCreator 和AuthorizationAttributeSourceAdvisor.需要给它们指定不同的ID。
shiro权限定义的三种方法的更多相关文章
- 获取SqlServer存储过程定义的三种方法
declare @p_text varchar(max) SELECT @p_text= text FROM syscomments WHERE id = ( SELECT id FROM sysob ...
- Javascript定义类(class)的三种方法
将近20年前,Javascript诞生的时候,只是一种简单的网页脚本语言.如果你忘了填写用户名,它就跳出一个警告. 如今,它变得几乎无所不能,从前端到后端,有着各种匪夷所思的用途.程序员用它完成越来越 ...
- [转]Javascript定义类的三种方法
作者: 阮一峰 原文地址:http://www.ruanyifeng.com/blog/2012/07/three_ways_to_define_a_javascript_class.html 将近2 ...
- Java反射定义、获取Class三种方法
反射机制的定义: 在运行状态时(动态的),对于任意一个类,都能够得到这个类的所有属性和方法. 对于任意一个对象,都能够调用它的任意属性和方法. Class类是反射机制的起源,我们得到Class类对象 ...
- js二维数组定义和初始化的三种方法总结
js二维数组定义和初始化的三种方法总结 方法一:直接定义并且初始化,这种遇到数量少的情况可以用var _TheArray = [["0-1","0-2"],[& ...
- 获得Window窗口权限的三种方法
1.第一种方法:利用视图控制器自带的View的window属性: 具体使用 self.view.window.rootViewController = ... 2.第二种方法:通过导入APPDele ...
- c#封装DBHelper类 c# 图片加水印 (摘)C#生成随机数的三种方法 使用LINQ、Lambda 表达式 、委托快速比较两个集合,找出需要新增、修改、删除的对象 c# 制作正方形图片 JavaScript 事件循环及异步原理(完全指北)
c#封装DBHelper类 public enum EffentNextType { /// <summary> /// 对其他语句无任何影响 /// </summary> ...
- Shiro权限管理框架(三):Shiro中权限过滤器的初始化流程和实现原理
本篇是Shiro系列第三篇,Shiro中的过滤器初始化流程和实现原理.Shiro基于URL的权限控制是通过Filter实现的,本篇从我们注入的ShiroFilterFactoryBean开始入手,翻看 ...
- JAVA之线程同步的三种方法
最近接触到一个图片加载的项目,其中有声明到的线程池等资源需要在系统中线程共享,所以就去研究了一下线程同步的知识,总结了三种常用的线程同步的方法,特来与大家分享一下.这三种方法分别是:synchroni ...
随机推荐
- phpcms发布到服务器修改
请进行以下步骤的修改: 1.修改/caches/configs/system.php里面所有和域名有关的,把以前的老域名修改为新域名就可以了. 2.进行后台设置->站点管理 对相应的站点的域名进 ...
- Leetcode 236
思路:1.如果p或q就是根节点,那么LCA=p或q,返回根节点(递归出口) 2.分治 2.1 Divide:分别计算左字树和右子树的LCA 2.2 Conquer:如果左字树和右子树的计算结果均不为空 ...
- selenium的基本介绍
应吴姑娘(漂亮的姑娘)之邀,加上我师兄(屌丝)和国新(屌丝),组了个四黑小团伙,每周二分享点东西,感觉就是四个辣鸡相互取暖.可惜,今天早上直接是睡过去了,下午都捐给了<白夜追凶>---没办 ...
- linux 常用命令总结(三)
1. setup // 进入相应配置界面,按空格键选择相关功能 2. ll // 列出当前目录下详细内容 :等价与ls -all 3. clear // 清理当前 ...
- 为什么iterator,foreach遍历时不能进行remove操作?除了一种情况可以这样(特殊情况)?
Exception in thread "main" java.util.ConcurrentModificationException 并发修改异常引发的思考! 1 foreac ...
- Django学习笔记之利用Form和Ajax实现注册功能
一.注册相关的知识点 1.Form组件 我们一般写Form的时候都是把它写在views视图里面,那么他和我们的视图函数也不影响,我们可以吧它单另拿出来,在应用下面建一个forms.py的文件来存放 2 ...
- Mysql主从架构报错-Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs; these UUIDs must be different for replication to work...
在搭建Mysql主从架构过程中,由于从服务器是克隆的主服务器系统,导致主从mysql uuid相同, Slave_IO无法启动,报错如下: The slave I/O thread stops bec ...
- Yahoo网站性能优化的34条规则
摘自:http://blog.chinaunix.net/uid/20714478/cid-74195-list-1.html Yahoo网站性能优化的34条规则 1.尽量减少HTTP请求次数 终端用 ...
- 20145215刘俊谦实验五 Java网络编程及安全
实验内容 掌握Socket程序的编写: 掌握密码技术的使用: 设计安全传输系统. 实验步骤 本次实验由两人组队完成,20145321曾子誉是我本次实验的搭档,链接为:http://www.cnblog ...
- 学号20145303 《Java程序设计》第一周学习总结
学号20145303 <Java程序设计>第一周学习总结 教材学习内容总结 *dos命令行: dir:列出当前目录下的文件及文件名 md:创建目录 rd:删除目录.为空时文件夹(文件夹为空 ...