Spring Boot使用的是1.4(包括1.4版本)之前的版本使用如下配置:
<!-- Spring Boot使用的是1.4(包括1.4版本)之前的版本使用如下配置 -->
<dependency>
<groupId></groupId>
<artifactId>spring-boot-starter-redis</artifactId>
</dependency>
<!-- 1.5.* 的版本需要指定版本号 -->
<!-- 1.5.* 的版本需要指定版本号 -->
<dependency>
<groupId></groupId>
<artifactId>spring-boot-starter-redis</artifactId>
<version>1.4.</version>
</dependency>
<!-- 2.* 版本 redis依赖改名了,直接使用下面的依赖 -->
<!-- 2.* 版本 redis依赖改名了,直接使用下面的依赖 -->
<dependency>
<groupId></groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>