Springboot集成Redis

1. 添加依赖

<dependency>
  <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-redis</artifactId>
   <version>1.4.7.RELEASE</version></dependency>

注解:spring-boot-starter-redis依赖和spring-boot-starter-data-redis两个依赖基本一致

2. application.properties配置redis信息

 

相关推荐