MyBatis에 EHCache 적용하기
1. pom.xml <dependency> <groupId>org.mybatis.caches</groupId> <artifactId>mybatis-ehcache</artifactId> <version>1.2.1</version> </dependency> 2. MyBatis 각 mapper xml <?xml version=”1.0″ encoding=”UTF-8″?> <!DOCTYPE mapper PUBLIC “-//mybatis.org//DTD Mapper 3.0//EN” “http://mybatis.org/dtd/mybatis-3-mapper.dtd”> <mapper namespace=”com.tachyon.api.repository.NewsRepository”> <!– MyBatis ehcache 설정 – http://mybatis.org/ehcache-cache/ –> <cache type=”org.mybatis.caches.ehcache.EhcacheCache”> <!– <cache type=”org.mybatis.caches.ehcache.EhBlockingCache”> –><!– blocking cache를 사용할 경우 –> <property name=”timeToIdleSeconds” value=”3600″/><!–1 hour–> <property name=”timeToLiveSeconds” value=”3600″/><!–1 hour–> <property name=”maxEntriesLocalHeap” value=”1000″/> <property… Read More »