Rehibernate4如何集成ocs的spymemcached?
Caused by: java.lang.ClassNotFoundException: Could not load requested class : com.googlecode.hibernate.memcached.MemcachedRegionFactory
-------------------------
Rehibernate4如何集成ocs的spymemcached?
<!-- hibernate cache config -->
<!-- 开启二级缓存 -->
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<!-- 是否缓存查询结果 -->
<prop key="hibernate.cache.use_query_cache">true</prop>
<!-- 缓存提供商 hibernate3配置 -->
<!-- <prop key="hibernate.cache.provider_class ">com.googlecode.hibernate.memcached.MemcachedCacheProvider</prop> -->
<!-- 缓存提供商 hibernate4配置 -->
<prop key="hibernate.cache.region.factory_class">com.googlecode.hibernate.memcached.MemcachedRegionFactory</prop>
<!-- 设置二级缓存的前缀名称 -->
<prop key="hibernate.cache.region_prefix">alltest_memcache</prop>
<!-- 否使用结构化的方式缓存对象
<prop key="hibernate.cache.use_structured_entries">true</prop>
强制Hibernate以更人性化的格式将数据存入二级缓存
<prop key="hibernate.cache.use_structured_entries">true</prop>
Hibernate将收集有助于性能调节的统计数据
<prop key="hibernate.generate_statistics">true</prop> -->
<!-- 切换使用不同的memcache客户端(SpyMemcacheClientFactory) -->
<prop key="hibernate.memcached.memcacheClientFactory">com.googlecode.hibernate.memcached.spymemcached.SpyMemcacheClientFactory</prop>
<prop key="hibernate.memcached.servers">${hibernate.memcached.servers}</prop>
<prop key="hibernate.memcached.cacheTimeSeconds">${hibernate.memcached.cacheTimeSeconds}