springboot 连接redis报错:
ERROR 19830 — [nio-8081-exec-1]
o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for
servlet [dispatcherServlet] in context with path [] threw exception
org.springframework.data.redis.RedisConnectionFailureException: Unable
to connect to Redis; nested exception is
io.lettuce.core.RedisConnectionException: Unable to connect to
127.0.0.1:6379
springboot版本:2.1.8
解决:
如果你的redis没有设置密码,那么就应该将配置文件中,redis的password项删掉或置空。
本文解析了SpringBoot应用在连接Redis服务器时遇到的连接失败问题。错误信息提示无法连接到本地的Redis服务,该问题通常发生在未正确配置Redis密码的情况下。文章提供了具体的解决方案,即在不使用密码时,应确保配置文件中的Redis密码项为空。
1万+

被折叠的 条评论
为什么被折叠?



