安卓篱笆

标题: java web运用@Cacheable配置,屡屡报错 [打印本页]

作者: GuiTarvvm2098    时间: 2018-3-23 06:00
标题: java web运用@Cacheable配置,屡屡报错
[size=1.2]按照网上流程一步步配置spring缓存,运行项目还是报错,什么情况?

第一步:spring-servlet.xml 添加如下声明
第二步:创建 ehcache.xml
但是运行项目还是报错:信息如下
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.
翻译:
在同一个虚拟机已经存在另一个未命名的缓存管理器。请提供每个CacheManager独特的名字在配置或做下列:
1。用一个CacheManager。create()静态工厂方法来重用相同的缓存管理器具有相同的名称或创建一个必要的
2。关机前早CacheManager相同名字的创造新的一。
可是我没有在哪里创建过CacheManager啊~~~~

更新:
看网上解决方案是加一句:<property name="shared" value="true"/>
但是我加了后 shared报红,说明没有这个属性。

                               
登录/注册后可看大图









欢迎光临 安卓篱笆 (http://www.okapk.net/) Powered by Discuz! X3.2