redisTemplate的一些操作可以参考下面俩篇文章
http://blog.csdn.net/whatlookingfor/article/details/51863286
http://www.jianshu.com/p/7bf5dc61ca06
导入redis依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
Jackson依赖
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.3.2</version>
</dependency>
配置application.yml配置文件
# REDIS (RedisProperties)
spring:
redis:
database: 0 # Redis数据库索引(默认为0)
host: localhost # Redis服务器地址
port: 6379