测试二级缓存出现的错误

测试二级缓存中出现的一个错误如下。

Caused by: org.hibernate.cache.NoCacheRegionFactoryAvailableException: Second-level cache is used in the application, but property hibernate.cache.region.factory_classis not gaven, please either disable second level cache or set correct region factory class name to property hibernate.cache.region.factory_class (and make sure the second level cache provider, hibernate-infinispan, for example, available in the classpath).

<property name="cache.provider_class">org.hibernate.cache.internal.EhCacheProvider</property>

改成

<property name="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</property>

即可。

posted @ 2016-05-06 09:47  CoderV的进阶笔记  阅读(450)  评论(0编辑  收藏  举报