Shiro 配置
来源:互联网 发布:java修改String类 编辑:程序博客网 时间:2024/05/06 12:28
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.2.xsd" default-autowire="byName" default-lazy-init="true">
<description>Shiro 配置</description>
<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager" />
<property name="loginUrl" value="/login" />
<property name="successUrl" value="/index" />
<property name="unauthorizedUrl" value="/error/noperms.jsp" />
<property name="filterChainDefinitions">
<value>
/error/** = anon
/resource/** = anon
/attached/** = anon
/login* = anon
/validateCode* = anon
/tmp_upload/** = anon
/index.jsp* = anon
/tchtml/** = anon
/dfhtml/** = anon
/fzhtml/** = anon
/tc/** = anon
/df/** = anon
/fz/** = anon
/activity/** = anon
/as/** = anon
/ashtml/** = anon
/zs/** = anon
/zshtml/** = anon
/lt/** = anon
/lthtml/** = anon
/WEB-INF/** = authc
/*.jsp* = authc
/** = authc
</value>
</property>
</bean>
<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<!--设置自定义realm -->
<property name="realm" ref="monitorRealm" />
<property name="cacheManager" ref="cacheManager" />
</bean>
<!-- securityManager -->
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="staticMethod" value="org.apache.shiro.SecurityUtils.setSecurityManager" />
<property name="arguments" ref="securityManager" />
</bean>
<!--自定义Realm 继承自AuthorizingRealm -->
<bean id="monitorRealm" class="org.cxm.wolf.interceptor.MonitorRealm" />
<!-- 用户授权信息Cache -->
<bean id="cacheManager" class="org.apache.shiro.cache.MemoryConstrainedCacheManager" />
</beans>
- Shiro 配置
- shiro配置
- shiro配置
- Shiro配置
- shiro配置
- shiro配置
- Shiro配置
- shiro配置
- shiro 配置
- shiro 配置
- 配置shiro
- shiro配置
- 【Apache-Shiro】shiro配置详解
- Apache Shiro 配置
- Apache Shiro 配置
- shiro详细配置
- shiro.ini 配置详解
- shiro简单配置
- 轻松搞定面试中的链表题目
- windows2003域用户批量绑定登录计算机
- linq初入交叉连接查询,两个对象之间分别匹配
- centos 放到后台执行命令
- cocos2dx场景切换动画
- Shiro 配置
- Node.js API学习第一天
- c语言变量的作用域
- 一步一步实现iOS应用PUSH功能
- cocos2d Touch处理摘抄总结
- How many sums?
- 测试本机的数据存储形式——大端还是小端
- 笔试——全排序算法(字典序法)——记Works Applications面试题
- java基础学习—基本数据类型