如何解决异常:
这是一个配置:
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
p:cacheManager-ref="ehcache" lazy-init="true"/>
<bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
p:configLocation="ehcache.xml"
p:shared="true"/>
</beans>
例外 :
Caused by: net.sf.ehcache.ObjectExistsException: Cache simple already exists
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:993) [ehcache-core-2.3.0.jar:]
at net.sf.ehcache.CacheManager.addCache(CacheManager.java:938) [ehcache-core-2.3.0.jar:]
at net.sf.ehcache.CacheManager.addCache(CacheManager.java:916) [ehcache-core-2.3.0.jar:]
at org.springframework.batch.admin.util.SimpleEhCacheInterceptor.afterPropertiesSet(SimpleEhCacheInterceptor.java:77) [spring-batch-admin-manager-1.2.2.BUILD-SNAPSHOT.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1545) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]