mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-05-14 12:52:08 +08:00
52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
# 端口
|
||
server:
|
||
port: 8081
|
||
|
||
spring:
|
||
# sa-token配置
|
||
sa-token:
|
||
# token名称 (同时也是cookie名称)
|
||
token-name: satoken
|
||
# token有效期,单位s 默认30天, -1代表永不过期
|
||
timeout: 2592000
|
||
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒, 默认-1 代表不限制 (例如可以设置为1800代表30分钟内无操作就过期)
|
||
activity-timeout: -1
|
||
# 在多人登录同一账号时,是否共享会话 (为true时共用一个,为false时新登录挤掉旧登录)
|
||
is-share: true
|
||
# 是否尝试从请求体里读取token
|
||
is-read-body: true
|
||
# 是否尝试从header里读取token
|
||
is-read-head: true
|
||
# 是否尝试从cookie里读取token
|
||
is-read-cookie: true
|
||
# token风格
|
||
token-style: uuid
|
||
# 是否在初始化配置时打印版本字符画
|
||
is-v: true
|
||
tokenSessionCheckLogin: false
|
||
|
||
|
||
# redis配置
|
||
redis:
|
||
# Redis数据库索引(默认为0)
|
||
database: 1
|
||
# Redis服务器地址
|
||
host: 127.0.0.1
|
||
# Redis服务器连接端口
|
||
port: 6379
|
||
# Redis服务器连接密码(默认为空)
|
||
password:
|
||
# 连接超时时间(毫秒)
|
||
timeout: 1000ms
|
||
lettuce:
|
||
pool:
|
||
# 连接池最大连接数
|
||
max-active: 200
|
||
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||
max-wait: -1ms
|
||
# 连接池中的最大空闲连接
|
||
max-idle: 10
|
||
# 连接池中的最小空闲连接
|
||
min-idle: 0
|
||
|
||
|