SSH 配置多SessionFactory,报错
net.sf.ehcache.hibernate.SingletonEhCacheRegionFactory
Caused by: net.sf.ehcache.CacheException: 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.
解决方法是在Hibernate的hibernateProperties配置中,加上
<prop key="hibernate.cache.region.factory_class">
</prop>