refactor: 适配 ContiNew Starter Spring Cache(缓存模块)

This commit is contained in:
2024-01-13 23:54:04 +08:00
parent 706e488e84
commit 754de79200
5 changed files with 64 additions and 156 deletions

View File

@@ -55,33 +55,31 @@ spring.liquibase:
# 配置文件路径
change-log: classpath:/db/changelog/db.changelog-master.yaml
--- ### Redis 配置(单机版)
spring.data:
redis:
# 地址
host: ${REDIS_HOST:127.0.0.1}
# 端口(默认 6379
port: ${REDIS_PORT:6379}
# 密码(未设置密码时可为空或注释掉)
password: ${REDIS_PWD:123456}
# 数据库索引
database: ${REDIS_DB:0}
# 连接超时时间
timeout: 10s
# 是否开启 SSL
ssl:
enabled: false
redisson:
enabled: true
mode: SINGLE
--- ### Spring Cache 配置
spring.cache:
redis:
# 缓存过期时长(单位:毫秒,默认 -1表示永不过期
time-to-live: 7200000
# 是否允许缓存空值(默认 true表示允许可以解决缓存穿透问题
cache-null-values: true
--- ### 缓存配置
spring:
## Spring Cache 配置
cache:
type: REDIS
data:
## Redis 配置(单机版)
redis:
# 地址
host: ${REDIS_HOST:127.0.0.1}
# 端口(默认 6379
port: ${REDIS_PORT:6379}
# 密码(未设置密码时可为空或注释掉)
password: ${REDIS_PWD:123456}
# 数据库索引
database: ${REDIS_DB:0}
# 连接超时时间
timeout: 10s
# 是否开启 SSL
ssl:
enabled: false
# Redisson 配置
redisson:
enabled: true
mode: SINGLE
--- ### 验证码配置
continew-starter.captcha: