解决SpringBoot集成Redis出现RedisConnectionException: Unable to connect to 192.168.64.100:6379
场景:在项目中集成Redis,Redis运行在虚拟机中,在确认路径、代码编写没问题下连接失败解决办法:查看有没有启动Redis服务器。redis的配置application.yml(或application.properties)中spring.redis.timeout连接超时时间(毫秒)中设置不能为0,一般修改如下:spring.redis.timeout=5000。找到redis的配置文件 redis.conf : 执行 vim redis.confprotected-mo
原创
2022-02-14 17:45:53 ·
4551 阅读 ·
0 评论