首页 > 技术文章 > [解决]spring-boot连接redis报连接超时问题Unable to connect to Redis; nested exception is io.lettuce.core.RedisCommandTimeoutException: Command timed out

jinlin 2018-06-07 16:54 原文

在学习纯洁的微笑的spring-boot整合redis的时候发现总是报redis连接超时

原文连接:https://www.cnblogs.com/ityouknow/p/5748830.html

最后发现是在application.properites的redis配置中的spring.redis.timeout中连接超时时间(毫秒)中时间设置不能为0

spring-boot整合redis过程中的坑

当使用spring-boot 1.4一下的版本的时候redis可以使用:spring-boot-starter-redis

使用1.4以上的版本的时候需要使用spring-boot-starter-data-redis

 

推荐阅读