shiro与spring集成时报Versions of Ehcache before version 2.5 allowed any number of CacheManagers with the
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了shiro与spring集成时报Versions of Ehcache before version 2.5 allowed any number of CacheManagers with the 相关的知识,希望对你有一定的参考价值。
shiro与spring集成时,一直报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.
The source of the existing CacheManager is: InputStreamConfigurationSource [[email protected]]
解决方法:把ehcache的jar包改成2.5前的,原因是2.5后CacheManager使用了单例.
顺便吐槽一下,现在百度一下问题,千篇一律的答案,全是复制别人的,没解释不说还不注明出处.
有需要的可以去看下那位博主所说的原因,地址为:http://blog.csdn.net/u013147600/article/details/48133913
以上是关于shiro与spring集成时报Versions of Ehcache before version 2.5 allowed any number of CacheManagers with the 的主要内容,如果未能解决你的问题,请参考以下文章
Shiro - Shiro简介;Shiro与Spring Security区别;Spring Boot集成Shiro