ClusterHostAndPorts must not be null!

版权声明:本文为博主原创文章,转载请声明。 https://blog.csdn.net/will_lam/article/details/83376589

使用springboot整合redis,启动报错,排查后发现是配置问题,配置集群参数前先要配置集群节点。

错误配置:

spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=pass123
spring.redis.timeout=1000

spring.redis.cluster.max-redirects=8

正确配置:

spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=pass123
spring.redis.timeout=1000

spring.redis.cluster.nodes=127.0.0.1:6379
spring.redis.cluster.max-redirects=8

猜你喜欢

转载自blog.csdn.net/will_lam/article/details/83376589