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

发布时间 2023-04-24 14:00:48作者: 醉逍遥_001

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

sping.redis.host=

spring.redis.port=

sping.redis.password=

spring.redis.database=

我写的是一个自定义的key如 com.dream.redis.host
改为springboot认识的即可
其他和springboot集成的组件类似,切记