最近扒了一段springbootde 代码,启动后报错:org.springframework.context.ApplicationContextException: Unable to start web server…
Caused by: java.net.ConnectException: Connection refused: no further information
提示的错误不明确。后查看配置,发现是Redis host配置有问题:
spring.redis.host=localhost
这个是连不上的,改成局域网IP或127.0.0.1都可以。
java连接redis的坑:Connection refused: no further information
最新推荐文章于 2024-05-02 11:39:04 发布