From 61de83f769642ff7da3d7f32b39c5014167a2950 Mon Sep 17 00:00:00 2001 From: 李宇 <986321569@qq.com> Date: 星期五, 15 一月 2021 17:34:48 +0800 Subject: [PATCH] 修改试剂库、库存查询,登录超时,导出订单领取 --- src/main/webapp/WEB-INF/spring-shiro.xml | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/WEB-INF/spring-shiro.xml b/src/main/webapp/WEB-INF/spring-shiro.xml index 7d0d169..65070e9 100644 --- a/src/main/webapp/WEB-INF/spring-shiro.xml +++ b/src/main/webapp/WEB-INF/spring-shiro.xml @@ -60,7 +60,14 @@ </bean> <!-- Cache Manager --> - <bean id="cacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager"></bean> + <bean id="cacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager"> + <property name="cacheManager" ref="ehcacheManager"/> + </bean> + + <!-- 如果有多个ehcacheManager要在bean加上p:shared="true" --> + <bean id="ehcacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> + <property name="configLocation" value="WEB-INF/ehcache.xml"/> + </bean> <!--session manager--> <bean id="sessionManager" @@ -77,6 +84,13 @@ <!--自定义 Realm--> <bean id="authorizationRealm" class="com.nanometer.smartlab.realm.AuthorizationRealm"> <property name="credentialsMatcher" ref="md5Matcher"/> + + <!-- 启用身份验证缓存,即缓存AuthenticationInfo信息,默认false --> + <property name="authenticationCachingEnabled" value="true"/> + <!-- 缓存AuthenticationInfo信息的缓存名称 --> + <property name="authenticationCacheName" value="authenticationCache"/> + <!-- 缓存AuthorizationInfo信息的缓存名称 --> + <property name="authorizationCacheName" value="authorizationCache"/> </bean> <!-- Security Manager --> @@ -95,4 +109,4 @@ <property name="securityManager" ref="securityManager"/> </bean> -</beans> \ No newline at end of file +</beans> -- Gitblit v1.9.2