merge
This commit is contained in:
@@ -319,7 +319,7 @@ public class SysUserService {
|
||||
SysUser user = getByUserName(userName);
|
||||
if (user != null) {
|
||||
//清空缓存数据
|
||||
CommonDataUtil.removeData(token);
|
||||
CommonDataUtil.clearData(token);
|
||||
//保存登出信息
|
||||
SysUserLoginInOut loginInOut = new SysUserLoginInOut();
|
||||
loginInOut.setCreateTime(new Date());
|
||||
|
||||
@@ -70,7 +70,6 @@ public class CommonDataUtil {
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -78,7 +77,7 @@ public class CommonDataUtil {
|
||||
*
|
||||
* @param key
|
||||
*/
|
||||
public static void removeData(String key) {
|
||||
public static void clearData(String key) {
|
||||
token.remove(key);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class LoginInterceptor extends HandlerInterceptorAdapter {
|
||||
String token = request.getHeader("token");
|
||||
if (session == null) {
|
||||
getOutputStream(response, "登录超时,请重新登录");
|
||||
CommonDataUtil.removeData(token);
|
||||
CommonDataUtil.clearData(token);
|
||||
return false;
|
||||
} else {
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
|
||||
Reference in New Issue
Block a user