dao层使用ehcache

This commit is contained in:
shuzheng 2016-10-19 16:57:34 +08:00
parent 3606bed771
commit 34233e79de
10 changed files with 14 additions and 9 deletions

View File

@ -184,5 +184,5 @@
name = #{name,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<cache eviction="LRU" flushInterval="60000" readOnly="true" size="1024" />
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -186,5 +186,5 @@
category_id = #{categoryId,jdbcType=INTEGER}
where article_category_id = #{articleCategoryId,jdbcType=INTEGER}
</update>
<cache eviction="LRU" flushInterval="60000" readOnly="true" size="1024" />
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -469,5 +469,5 @@
orders = #{orders,jdbcType=BIGINT}
where article_id = #{articleId,jdbcType=INTEGER}
</update>
<cache eviction="LRU" flushInterval="60000" readOnly="true" size="1024" />
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -186,5 +186,5 @@
tag_id = #{tagId,jdbcType=INTEGER}
where article_tag_id = #{articleTagId,jdbcType=INTEGER}
</update>
<cache eviction="LRU" flushInterval="60000" readOnly="true" size="1024" />
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -293,5 +293,5 @@
orders = #{orders,jdbcType=BIGINT}
where category_id = #{categoryId,jdbcType=INTEGER}
</update>
<cache eviction="LRU" flushInterval="60000" readOnly="true" size="1024" />
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -186,5 +186,5 @@
tag_id = #{tagId,jdbcType=INTEGER}
where category_tag_id = #{categoryTagId,jdbcType=INTEGER}
</update>
<cache eviction="LRU" flushInterval="60000" readOnly="true" size="1024" />
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -328,5 +328,5 @@
ctime = #{ctime,jdbcType=BIGINT}
where comment_id = #{commentId,jdbcType=INTEGER}
</update>
<cache eviction="LRU" flushInterval="60000" readOnly="true" size="1024" />
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -263,5 +263,5 @@
orders = #{orders,jdbcType=BIGINT}
where tag_id = #{tagId,jdbcType=INTEGER}
</update>
<cache eviction="LRU" flushInterval="60000" readOnly="true" size="1024" />
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -292,5 +292,5 @@
ctime = #{ctime,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
<cache eviction="LRU" flushInterval="60000" readOnly="true" size="1024" />
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
</mapper>

View File

@ -29,10 +29,15 @@
<!-- 生成在XML中的<cache>元素 -->
<plugin type="org.mybatis.generator.plugins.CachePlugin">
<!-- 使用ehcache -->
<property name="cache_type" value="org.mybatis.caches.ehcache.LoggingEhcache" />
<!-- 内置cache配置 -->
<!--
<property name="cache_eviction" value="LRU" />
<property name="cache_flushInterval" value="60000" />
<property name="cache_readOnly" value="true" />
<property name="cache_size" value="1024" />
-->
</plugin>
<!-- Java模型生成equals和hashcode方法 -->