问题描述
您好,因此我曾经使用单个缓存提供程序来管理我的缓存,但是现在我必须使用多个缓存提供程序 而且我在初始化bean时遇到了一些问题,实际上我得到了这个错误:
是否可以为我的XML bean定义特定的提供程序?
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jCacheManager' defined in class path resource [default-beans.xml]: Invocation of init method failed; nested exception is javax.cache.CacheException: Multiple CachingProviders have been configured when only a single CachingProvider is expected
我的豆子
<bean id="jCacheManager" class="org.springframework.cache.jcache.JCacheManagerFactoryBean">
<property name="cacheManagerUri" value="classpath:ehcache.xml"/>
</bean>
<bean id="DefaultCacheManager" class="org.springframework.cache.jcache.JCacheCacheManager" scope = "singleton">
<property name="cacheManager" ref="jCacheManager" />
</bean>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)