1、配置依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-redis</artifactId>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
</dependency>
2、配置文件 application.properties
spring.redis.cluster.nodes=192.168.23.100:7001,192.168.23.110:7001,192.168.23.120:7001
3、配置 redisConfig
参考 https://blog.csdn.net/sky_eyeland/article/details/91492483