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/t6e3tlMhkGAAAAAIC1YkQ7QniRJUuWyGQyJjvS2yvHMFl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MyQZwY5cXzd637i+zt7efuSV7/DW9XX2vmRuX3tqZl+5KgyJY29NBGr3RLO1BACsCrj0dAPsCGA5GMCO5Gan0OrE8QO52Qe++MfmkW36bIa3I2PuEtfX2fuSb2MMdyeSX1+H1N8bqd4TzdcSALAq4NLTDbAjgOVgADuSn5NGq1Ofj361/R/bQpmyGdyOjL1HXF9n7ysvHL7bGPBORPvWSOWeaMaWAIBVAZeeboAdASwHA9iRgjwho059ghD65/YwljwGtyO+9tRbxPB9hHhvZOA7kVq6yj3RjC0BAKsCLj3dADsCWA4GsCOF+Rn0uuP0T/SZX37Gjn+8teMOQ578DNPYEeK9kRZ3otHn1GgTdbcjpmkJAFgVcOnpBtgRwHIwgB0pLszSR6b4sGZki3yebXSRtZByI9L2TqTDhzWmagkAWBVw6ekG2BHAcjCAHSkpztZHRn2UlfIdPuIbe5T3QIiya+zX+cgdtIlqB1G9ti2hJQBgVcClpxtgRwDLwQB2pKwkVx8Z+Yu+RkKHL/qatCUAYFXApacbYEcAy8EAduR+WYE+MoIdGf0FJGOh/c+gmbglAGBVwKWnG2BHAMvBAHak4n6RPjKGHTEX8EvVAGAW4NLTDbAjgOVgADtSWVGij8COAACgJ3Dp6QbYEcByMIAd0R+wIwAA6ANceroBdgSwHPS1I4YiEgAAADA5JphmAIALetkRE7QPAAAAAIAJD9gRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMDNgRAAAAAADMzP8H2uilSGybf2wAAAAASUVORK5CYII=" alt="" />

3.在注解上定义

开启注解(添加如下配置文件)

 <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权限定义的三种方法的更多相关文章

  1. 获取SqlServer存储过程定义的三种方法

    declare @p_text varchar(max) SELECT @p_text= text FROM syscomments WHERE id = ( SELECT id FROM sysob ...

  2. Javascript定义类(class)的三种方法

    将近20年前,Javascript诞生的时候,只是一种简单的网页脚本语言.如果你忘了填写用户名,它就跳出一个警告. 如今,它变得几乎无所不能,从前端到后端,有着各种匪夷所思的用途.程序员用它完成越来越 ...

  3. [转]Javascript定义类的三种方法

    作者: 阮一峰 原文地址:http://www.ruanyifeng.com/blog/2012/07/three_ways_to_define_a_javascript_class.html 将近2 ...

  4. Java反射定义、获取Class三种方法

    反射机制的定义: 在运行状态时(动态的),对于任意一个类,都能够得到这个类的所有属性和方法.  对于任意一个对象,都能够调用它的任意属性和方法. Class类是反射机制的起源,我们得到Class类对象 ...

  5. js二维数组定义和初始化的三种方法总结

    js二维数组定义和初始化的三种方法总结 方法一:直接定义并且初始化,这种遇到数量少的情况可以用var _TheArray = [["0-1","0-2"],[& ...

  6. 获得Window窗口权限的三种方法

    1.第一种方法:利用视图控制器自带的View的window属性:  具体使用 self.view.window.rootViewController = ... 2.第二种方法:通过导入APPDele ...

  7. c#封装DBHelper类 c# 图片加水印 (摘)C#生成随机数的三种方法 使用LINQ、Lambda 表达式 、委托快速比较两个集合,找出需要新增、修改、删除的对象 c# 制作正方形图片 JavaScript 事件循环及异步原理(完全指北)

    c#封装DBHelper类   public enum EffentNextType { /// <summary> /// 对其他语句无任何影响 /// </summary> ...

  8. Shiro权限管理框架(三):Shiro中权限过滤器的初始化流程和实现原理

    本篇是Shiro系列第三篇,Shiro中的过滤器初始化流程和实现原理.Shiro基于URL的权限控制是通过Filter实现的,本篇从我们注入的ShiroFilterFactoryBean开始入手,翻看 ...

  9. JAVA之线程同步的三种方法

    最近接触到一个图片加载的项目,其中有声明到的线程池等资源需要在系统中线程共享,所以就去研究了一下线程同步的知识,总结了三种常用的线程同步的方法,特来与大家分享一下.这三种方法分别是:synchroni ...

随机推荐

  1. 28UDP

    UDP通信流程步骤: 服务端: 等待(被动)接收发送 1: 创建 socket:  socket() 2: 绑定端口:      bind() 3: 读取消息:      read() 4: 发送消息 ...

  2. Linux下编程学习一

    本篇主要记录一些在学习LINUX下编程时,, C和C++语言的一些基础的常识, 一. 函数指针 void MyFun(int x); 函数声明 void (*FunP)(int ); 函数指针声明 下 ...

  3. 粗略介绍Java AQS的实现原理

    本文转自 http://www.importnew.com/24006.html 感谢作者 对我很有帮助 ①引言 AQS是JDK1.5提供的一个基于FIFO等待队列一个同步器的基础框架,java中的同 ...

  4. ashx 方法模板

    ; ); //查询字符串拼接 string searchparams = DTRequest.GetQueryString("jsonstring"); fooddetail mo ...

  5. [one day one question] Iscroll 5.0 在chrome上无法滑动

    问题描述: Iscroll 5.0 在chrome上无法滑动,不仅仅在chromePC的开发的时候,在手机上的chrome也有同样的问题,这怎么破? 解决方案: // 关闭 PointerEvent ...

  6. CentOS下yum安装FFmpeg

    一.yum安装FFmpeg 1.    最偷懒的方式就是yum安装了,自动解决依赖.不过CentOS系统默认无FFmpeg源,企业版 Linux 附加软件包EPEL源也不包含,需要手动添加yum源配置 ...

  7. Session管理之超时设置和强制下线

    关于Session,在Java Web开发中,为我们提供了很多方便,Session是由浏览器和服务器之间维护的.好吧,闲话不多说,下面让我们一步一步来实现它们. (一)首先来说下Session超时时间 ...

  8. hello java !

    我对于计算机性编程性质的课程一直没有很好的悟性,但功夫不服有心,最近自己学习视频课程,随时关注娄老师的博客,慢慢的对于java编程有了新的认识,也用eclipse软件进行了简单java的编译. 了解的 ...

  9. $.getJSON()函数内的数据不能传到全局变量是怎么回事?

    var json_obj2; $.getJSON("js/invite_panel.json",function(data){ json_obj2=data }) console. ...

  10. Swift开发之泛型实例

    一.Swift泛型 泛型能够让开发者编写自定义需求已经任意类型的灵活可用的的函数和类型.能够让我们避免重复的代码.用一种清晰和抽象的方式来表达代码的意图. func swapTwoStrings(_ ...