码迷,mamicode.com
首页 > 编程语言 > 详细

解决spring+shiro cacheManager 登录报错

时间:2016-08-04 23:18:07      阅读:4802      评论:0      收藏:0      [点我收藏+]

标签:

一、项目启动,登录报错
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘shiroFilter‘ defined in class path resource [spring-mvc.xml]: Cannot resolve reference to bean ‘securityManager‘ while setting bean property ‘securityManager‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘securityManager‘ defined in class path resource [spring-mvc.xml]: Cannot resolve reference to bean ‘sessionManager‘ while setting bean property ‘sessionManager‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sessionManager‘ defined in class path resource [spring-mvc.xml]: Cannot resolve reference to bean ‘ecacheManager‘ while setting bean property ‘cacheManager‘; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ecacheManager‘ defined in class path resource [spring-mvc.xml]: Initialization of bean failed; nested exception is org.springframework.beans.FatalBeanException: Error initializing bean [ecacheManager]; nested exception is org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: Another unnamed CacheManager already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following:
1. Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary
2. Shutdown the earlier cacheManager before creating new one with same name.

二、解决方案:
<ehcache.version>2.4.8</ehcache.version>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>${ehcache.version}</version>
</dependency>

解决spring+shiro cacheManager 登录报错

标签:

原文地址:http://www.cnblogs.com/sprinng/p/5738668.html

(5)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!