Springboot中redis配置不生效,spring.redis显示Deprecated的解决方法

340 阅读1分钟

springboot在yml中配置redis时,spring.redis显示Deprecated且划横线

Snipaste_2024-03-21_09-13-20.jpg

解决方法

在springboot3.x版本中,该配置已被弃用,应该使用

data:
  redis:
    host: 127.0.0.1
    port: 6379