forked from github/dataease
feat: 初始密码和登录超时时间设置在dataease.properties里
This commit is contained in:
parent
32299104e7
commit
484d931fd6
@ -85,8 +85,10 @@ public class JWTUtils {
|
|||||||
public static boolean loginExpire(String token){
|
public static boolean loginExpire(String token){
|
||||||
if (Login_Interval==0) {
|
if (Login_Interval==0) {
|
||||||
String property = CommonBeanFactory.getBean(Environment.class).getProperty("dataease.login_timeout");
|
String property = CommonBeanFactory.getBean(Environment.class).getProperty("dataease.login_timeout");
|
||||||
int seconds = StringUtils.isNotEmpty(property) ? Integer.parseInt(property): (10*60);
|
// 默认超时时间是8h
|
||||||
Login_Interval = seconds * 1000;
|
int minute = StringUtils.isNotEmpty(property) ? Integer.parseInt(property): (8*60);
|
||||||
|
// 分钟换算成毫秒
|
||||||
|
Login_Interval = minute * 1000 * 60;
|
||||||
}
|
}
|
||||||
Long now = System.currentTimeMillis();
|
Long now = System.currentTimeMillis();
|
||||||
Long lastOperateTime = tokenLastOperateTime(token);
|
Long lastOperateTime = tokenLastOperateTime(token);
|
||||||
|
@ -62,10 +62,12 @@ spring.mvc.log-request-details=true
|
|||||||
pagehelper.PageRowBounds=true
|
pagehelper.PageRowBounds=true
|
||||||
#excel等用户上传文件路径
|
#excel等用户上传文件路径
|
||||||
upload.file.path=/opt/dataease/data/upload/
|
upload.file.path=/opt/dataease/data/upload/
|
||||||
|
|
||||||
|
#初始密码和登录超时时间移到/opt/dataease/conf/dataease.properties
|
||||||
#用户初始密码,如果不设置默认是DataEase123..
|
#用户初始密码,如果不设置默认是DataEase123..
|
||||||
dataease.init_password=DataEase123456
|
#dataease.init_password=DataEase123456
|
||||||
#登录超时时间单位s 设置默认30分钟 如果雨不设置 默认10分钟也就是10*60
|
#登录超时时间单位min
|
||||||
dataease.login_timeout=1800
|
#dataease.login_timeout=480
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user