配置类重构

This commit is contained in:
click33
2021-06-16 17:28:07 +08:00
parent f6f4d337c9
commit 1559406ece
8 changed files with 92 additions and 69 deletions

View File

@@ -16,6 +16,7 @@ public class SaTokenDemoApplication {
public static void main(String[] args) {
SpringApplication.run(SaTokenDemoApplication.class, args);
System.out.println("\n启动成功sa-token配置如下" + SaManager.getConfig());
System.out.println("\n启动成功sa-token配置如下" + SaManager.getConfig().getIsConcurrent());
}
}

View File

@@ -12,7 +12,7 @@ spring:
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
activity-timeout: -1
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
allow-concurrent-login: true
is-concurrent: false
# 在多人登录同一账号时是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
is-share: true
# token风格
@@ -20,6 +20,8 @@ spring:
# 是否输出操作日志
is-log: false
is-print: false
# redis配置
redis:
# Redis数据库索引默认为0