Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnect

今天碰到这个问题了,挺搞笑的,解决方式是:
1.正确配置
spring:
redis:
#数据库索引
database: 0
host: 127.0.0.1
port: 6379
password:
jedis:
pool:
#最大连接数
max-active: 8
#最大阻塞等待时间(负数表示没限制)
max-wait: -1
#最大空闲
max-idle: 8
#最小空闲
min-idle: 0
#连接超时时间
timeout: 10000

2.启动的是redi服务端 redis-server.exe 不是客户端 redis-cli.exe
白白浪费了时间,笑哭

参考:https://www.jianshu.com/p/e7ae4a78995b

猜你喜欢

转载自blog.csdn.net/Retank/article/details/89554625