基于spring的redisTemplate的缓存工具类
pom.xml文件添加
<!-- config redis data and client jar -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>1.8.1.RELEASE</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
</dependency>
剩下的内容参考下方我的有道云笔记链接:
http://note.youdao.com/noteshare?id=fd3f0d7bd110088e73fb000d7c1cf091&sub=1573EB9218FB40CA8A44C7D4B206B8D4