SpringBoot JetCache redis.lettuce yml密码配置
项目中使用了jetcache并使用remote远程redis缓存,type为redis.lettuce,搞半天不知道密码怎么配置,官网也没写,只能啃源码了,发现密码配置在uri上,做个记录。。
yml配置
jetcache:
statIntervalMinutes: 30
areaInCacheName: false
local:
default:
type: caffeine
keyConvertor: fastjson
limit: 5000
expireAfterWriteInMillis: 120000
remote:
default:
type: redis.lettuce
keyConvertor: fastjson
valueEncoder: kryo
valueDecoder: kryo
# uri格式:redis://密码@ip:端口/redis库名?timeout=5s
uri: redis://123456@127.0.0.1:6379/1?timeout=5s
poolConfig:
minIdle: 5
maxIdle: 20
maxTotal: 50
本文由 创作,采用 知识共享署名4.0 国际许可协议进行许可。本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。最后编辑时间为: 2021/03/24 02:35