出现了这样 的报错
Caused by: org.hibernate.cache.CacheException: 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:
- Use one of the CacheManager.create() static factory methods to reuse same CacheManager with same name or create one if necessary
- Shutdown the earlier cacheManager before creating new one with same name.
The source of the existing CacheManager is: DefaultConfigurationSource [ ehcache.xml or ehcache-failsafe.xml ]
在我测试openSession(); 是否为新的时候
CustomerDao CC= new CustomerDao();
CC.save(null);
CC.save(null);
CC.save(null);