#redis配置
spring:
redis:
database: 1
host: 127.0.0.1
port: 6379
password: 123456
timeout: 10000
block-when-exhausted: true
pool:
max-active: 1024
max-wait: 10000
max-idle: 200
min-idle: 0
备注解释:
block-when-exhausted: true
// 连接耗尽时是否阻塞, false报异常,ture阻塞直到超时, 默认true
// 是否启用pool的jmx管理功能, 默认true
config.setJmxEnabled(true);