1、加入包

 1 <dependency>
 2             <groupId>org.springframework.boot</groupId>
 3             <artifactId>spring-boot-starter-cache</artifactId>
 4         </dependency>
 5         <dependency>
 6             <groupId>org.springframework.boot</groupId>
 7             <artifactId>spring-boot-starter-data-redis</artifactId>
 8             <exclusions>
 9                 <exclusion>
10                     <groupId>redis.clients</groupId>
11                     <artifactId>jedis</artifactId>
12                 </exclusion>
13                 <exclusion>
14                     <groupId>io.lettuce</groupId>
15                     <artifactId>lettuce-core</artifactId>
16                 </exclusion>
17             </exclusions>
18         </dependency>
19         <dependency>
20             <groupId>redis.clients</groupId>
21             <artifactId>jedis</artifactId>
22         </dependency>
maven

相关文章: