目录
关于Redis的集群搭建
大家可以参考下如何在ubuntu上通过docker搭建redis集群
https://blog.csdn.net/Delicious_Life/article/details/104838719
1.在项目中导入redis依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
2.添加redis连接信息
在application.properties中添加redis的集群信息
spring.redis.jedi