sys.visit.tokentime解析出错加保护
This commit is contained in:
parent
f34656b648
commit
9eb49e1b09
|
|
@ -206,8 +206,12 @@ public class TokenService {
|
||||||
private Long getTokenTime(){
|
private Long getTokenTime(){
|
||||||
long tokenTime = 20L;
|
long tokenTime = 20L;
|
||||||
String redisResult = redisService.getCacheObject("sys_config:"+ "sys.visit.tokentime");
|
String redisResult = redisService.getCacheObject("sys_config:"+ "sys.visit.tokentime");
|
||||||
if(!redisResult.isEmpty()) {
|
if(StringUtils.isNotEmpty(redisResult)) {
|
||||||
tokenTime = Long.parseLong(redisResult);
|
try {
|
||||||
|
tokenTime = Long.parseLong(redisResult);
|
||||||
|
} catch (Exception e) {
|
||||||
|
tokenTime = 43200L; //MINUTES
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
Long result = systemConfig.getTokenTime();
|
Long result = systemConfig.getTokenTime();
|
||||||
if (!ObjectUtil.isEmpty(result)){
|
if (!ObjectUtil.isEmpty(result)){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue