Skip to content

Commit

Permalink
优化用户信息获取逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Apr 19, 2017
1 parent ddd7162 commit 6700a9a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ public boolean validate(ProceedingJoinPoint pjp) {
HttpSession session = request.getSession(false);
if (session == null) throw new AuthorizeException("未登录", 401);
user = httpSessionManager.getUserBySessionId(session.getId());
if (user == null) throw new AuthorizeException("未登录", 401);
if (user == null)
user = (User) session.getAttribute("user");
if (user == null)
throw new AuthorizeException("未登录", 401);
}
if (config.isEmpty()) return true;
Map<String, Object> param = new LinkedHashMap<>();
Expand Down

0 comments on commit 6700a9a

Please sign in to comment.