Net.sf.ehcache.CacheException:Another unnamed CacheManager already exists in the same VM. Provide unique names for each cachemanager in the config or do one of the following:
The system will create CacheManager, but there is no beanid, can not be injected to get chachemanager, with ehcache.xml into the SRC root folder, you can actively create the cache,
Assuming that you are in a free folder, you can create a cache by adding listener to the file creation Cachemanage under Web. xml
For example, the following configuration shiro the cache with ehcachecachemanager, because the system can only create a ehcachecachemanager
so make your own and system creation way from the same place. Even if used under the Classpath path through the Ehcache.xml configuration.
Then let yourself and the system point to it can be, the file name must be Ehcache.xml
<bean id= "Ehcachemanager"
class= "Org.springframework.cache.ehcache.EhCacheManagerFactoryBean" >
<property name= "configlocation" value= "Classpath:/ehcache.xml"/>
<property name= "Shared" value= "true"/>
</bean>
<bean id= "CacheManager" class= "Org.springframework.cache.ehcache.EhCacheCacheManager" >
<property name= "CacheManager" ref= "Ehcachemanager"/>
</bean>
<bean id= "Shirocachemanager" class= "Org.apache.shiro.cache.ehcache.EhCacheManager" >
<property name= "CacheManager" ref= "Ehcachemanager"/>
</bean>
Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center ">
CacheManager Loading problems