1. Springboot starter 提供了 redis 的starter
spring-boot-starter-data-redis
https://docs.spring.io/spring-boot/docs/2.3.0.M4/reference/htmlsingle/#using-boot-starter
2. Maven 引入starter
https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-redis
当前最新版本是
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> <version>2.2.6.RELEASE</version> </dependency>
可以看到它的依赖