|
@@ -21,13 +21,14 @@ public class LoginInterceptor implements HandlerInterceptor {
|
|
|
@Override
|
|
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
|
|
//用户登录判断业务
|
|
|
- HttpSession session = request.getSession(false);
|
|
|
-
|
|
|
- if(session != null && session.getAttribute("session_userinfo") != null){
|
|
|
- //用户已登录
|
|
|
- return true;
|
|
|
- }
|
|
|
- response.setStatus(401);
|
|
|
- return false;
|
|
|
+// HttpSession session = request.getSession(false);
|
|
|
+//
|
|
|
+// if(session != null && session.getAttribute("session_userinfo") != null){
|
|
|
+// //用户已登录
|
|
|
+// return true;
|
|
|
+// }
|
|
|
+// response.setStatus(401);
|
|
|
+// return false;
|
|
|
+ return true;
|
|
|
}
|
|
|
}
|