mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-23 12:58:41 +08:00
refactor: 适配 ContiNew Starter Spring Cache(缓存模块)
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user