官方地址:http://mybatis.org/redis-cache/
mybatis配置redis
依赖:
<dependency>
<groupId>org.mybatis.caches</groupId>
<artifactId>mybatis-redis</artifactId>
<version>1.0.0-beta2</version>
</dependency>
then, just configure it in the mapper XML配置示例如下:
<mapper namespace="org.acme.FooMapper">
<cache type="org.mybatis.caches.redis.RedisCache" />
</mapper>