<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" 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.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd" default-lazy-init="true"> <bean id="s
ecurityFilter" class="org.apache.shiro.spring.web.ShiroFilter
factorybean"> <property name="s
ecurityManager" ref="s
ecurityManager" /> <property name="loginUrl" value="${s
ecurity.casServer}/casServer/login?service=${s
ecurity.local.project}/cas" /> <property name="successUrl" value="/index.html" /> <property name="filters"> <util:map> <entry key="casFilter" value-ref="casFilter" /> <entry key="cas
logout" value-ref="cas
logout" /> </util:map> </property> <property name="filterChainDe
Finitions"> <value> /cas=casFilter /
logout=cas
logout /service/public = anon /**=roles[ROLE_USER] </value> </property> </bean> <bean id="cas
logout" class="org.apache.shiro.web.filter.authc.
logoutFilter"> <property name="redirectUrl" value="${s
ecurity.casServer}/casServer/
logout?service=${s
ecurity.local.project}" /> </bean> <bean id="casFilter" class="org.apache.shiro.cas.CasFilter"> <property name="failureUrl" value="/WEB-INF/error/500.jsp" /> </bean> <bean id="casRealm" class="com.creditcities.framework.s
ecurity.CasRealm"> <property name="defaultRoles" value="ROLE_USER" /> <property name="roleAttributeNames" value="roles"/> <property name="cacheManager" ref="shirocacheManager"/> <property name="authorizationCacheName" value="shiro-activeRealmCache"/> <property name="permissionAttributeNames" value="permissions"/> <property name="casServerUrlPrefix" value="${s
ecurity.casServer}/casServer" /> <property name="casService" value="${s
ecurity.local.project}/cas" /> </bean> <bean id="memcachedClient
factorybean" class="net.spy.memcached.spring.MemcachedClient
factorybean"> <property name="servers" value="${memcached.url}" /> <property name="protocol" value="TEXT" /> <property name="locatorType" value="CONSISTENT" /> <property name="opTimeout" value="1000" /> </bean> <bean id="spyMemcachedClient" class="com.creditcities.framework.cache.SpyMemcachedClient"> <property name="memcachedClient" ref="memcachedClient
factorybean"/> </bean> <bean id="shirocacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager"> <property name="cacheManagerCon
figFile" value="cla
sspath:/ehcache.xml" /> </bean> <!-- <bean id="shirocacheManager" class="com.creditcities.framework.s
ecurity.MemcachedManager"> <property name="memcachedClient" ref="memcachedClient
factorybean"/> <property name="expiredTime" value="1800" /> </bean> --> <bean id="sessionManager" class="org.apache.shiro.web.session.mgt.DefaultWebSessionManager"> <property name="sessionDAO" ref="sessionDAO"/> <property name="cacheManager" ref="shirocacheManager"/> <property name="sessionListeners"> <list> <bean class="com.creditcities.framework.s
ecurity.SessionListener"></bean> </list> </property> </bean> <bean id="sessionDAO" class="org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO"> <property name="cacheManager" ref="shirocacheManager"/> </bean> <bean id="s
ecurityManager" class="org.apache.shiro.web.mgt.DefaultWebS
ecurityManager"> <property name="sessionManager" ref="sessionManager"/> <property name="sessionMode" value="http" /> <property name="realm" ref="casRealm" /> <property name="subjectFactory" ref="casSubjectFactory" /> </bean> <bean id="casSubjectFactory" class="org.apache.shiro.cas.CasSubjectFactory" /> <bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor" /> <bean class="org.apache.shiro.spring.s
ecurity.interceptor.AuthorizationAttributeSourceAdvisor"> <property name="s
ecurityManager" ref="s
ecurityManager"/> </bean> <!-- <bean --> <!-- class="org.springframework.beans.factory.con
fig.MethodInvoking
factorybean"> --> <!-- <property name="stati
cmethod" --> <!-- value="org.apache.shiro.S
ecurityUtils.setS
ecurityManager" /> --> <!-- <property name="arguments" ref="s
ecurityManager" /> --> <!-- </bean> --> <bean id="s
ecurityMethodMatcher
pointcutAdvisor" class="com.creditcities.framework.s
ecurity.S
ecurityMethod
pointcutAdvisor"> </bean> </beans>
原文地址:https://www.jb51.cc/xml/298812.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。