spring boot中怎么配置redis
更新:HHH   时间:2023-1-7


spring boot中怎么配置redis,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
spring:
    redis:
       #服务器地址
      host: dev.redis.i.sixi.com
        #服务器链接端口
      port: 6379
        #服务器连接密码(默认为空)
      password:
      database: 10
      lettuce:
        pool:
          max-active: 32
          max-wait: 300ms
          max-idle: 16
          min-idle: 8

看完上述内容,你们掌握spring boot中怎么配置redis的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注天达云行业资讯频道,感谢各位的阅读!

返回大数据教程...