二級緩存有問題啊 有問題
WARN: HHH020003: Could not find a specific ehcache configuration for cache named [com.chinawit.entity.BookInfoVo]; using defaults.
Exception in thread "main" java.lang.NoSuchMethodError: net.sf.ehcache.config.CacheConfiguration.isTerracottaClustered()Z
at org.hibernate.cache.ehcache.internal.util.HibernateEhcacheUtils.validateEhcache(HibernateEhcacheUtils.java:119)
at org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory.getCache(AbstractEhcacheRegionFactory.java:184)
at org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory.buildEntityRegion(AbstractEhcacheRegionFactory.java:127)
at org.hibernate.cache.ehcache.EhCacheRegionFactory.buildEntityRegion(EhCacheRegionFactory.java:48)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:362)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1857)
at com.chinawit.util.HiberateUtil.<clinit>(HiberateUtil.java:22)
at com.chinawit.test.Test.main(Test.java:23)
是我的eache.xml 文件有問題么 ? 麻煩大神指點一下啊 ? = = ? ??
或者 ?有木有 好心人貼一下 ?你們這塊地 ?xml文件 代碼啊 ? ?
2017-03-10
<ehcache>
<diskStore path="java.io.tmpdir" />
<defaultCache maxElementsInMemory="10000" eternal="false"
timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="true" />
</ehcache>
這個是默認的,不用改也不會出現你的那個問題
2017-03-10
看一下你的entity.BookInfoVo中是否配置了catche標簽