@Override
protected boolean addUUIDSessionedObject(String uuid) {
if (Strings.isBlank(uuid)) {
return true;
}
if (null == Mvcs.getReq().getSession().getAttribute(SessionKeys.API_SESSION_USER_KEY)) {
User employee = ioc.get(IUserDao.class, "userDao").findByCondition(Cnd.where("name", "=", uuid));
if (null == employee) {
try {
ResponseUtils.responseException("非法调用:不符合参数传递规则", Mvcs.getReq(), Mvcs.getResp());
return false;
} catch (IOException e) {
e.printStackTrace();
}
}
Mvcs.getReq().getSession().setAttribute(SessionKeys.API_SESSION_USER_KEY, employee);
return true;
}
System.out.println(uuid);
System.out.println("222");
return true;
}
9 回复
@wendal KopSessionKeepFilter
@wendal 对 是ActionFilter
@wendal uuid 就相当于token呗,客户端传过来需要先判断用户是否登录或是过期,但是这个值拿不到,现在是null值
添加回复
请先登陆