springboot集成redis时总报错Connection refused: no further information: localhost/127.0.0.1:6379

nacos上配置的关于redis的key值不是springboot需要的固定写法如:

sping.redis.host=

spring.redis.port=

sping.redis.password=

spring.redis.database=

我写的是一个自定义的key如 com.dream.redis.host
改为springboot认识的即可
其他和springboot集成的组件类似,切记
posted @ 2023-04-24 13:55  醉逍遥_001  阅读(394)  评论(0编辑  收藏  举报