springboot高版本与低版本的redis配置

springboot1版本配置:

redis:
  host: localhost
  port: 6379
  password: 123456
  timeout: 10000
  pool:
    max-active: 10
    min-idle: 3
    max-idle: 5

springboot2版本配置:

redis:
  host: localhost
  port: 6379
  password: 123456
  timeout: 10000ms
  lettuce:
    pool:
      max-active: 10
      min-idle: 3
      max-idle: 5

说明:springboot2版本中,把pool迁移到了lettuce内了。另外限制了timeout必须添加单位。

简单明了,看很多文章BB一堆,直接上代码不就完了,大家又不是看不懂

你可能感兴趣的:(springBoot,redis)