派生自 pfms_20210718_old

Jayden
2021-07-18 7df57dc07b6edd9446f5f53ee0a8ad6d7e6363a5
src/main/java/cn/org/xinke/annotation/LoginAspect.java
@@ -31,7 +31,7 @@
        // 登录认证
        User loginUser = (User) request.getSession().getAttribute( "LOGIN_USER" );
        if (loginUser == null) {
            response.sendRedirect( "/login.html" );
            response.sendRedirect( loadContextPath(request) + "/login.html" );
        }
        try {
            return pjp.proceed();
@@ -39,4 +39,12 @@
            throw throwable;
        }
    }
    public String loadContextPath(HttpServletRequest request) {
       String contextPath = request.getContextPath();
       if(contextPath.equals("/")) {
          contextPath = "";
       }
       return contextPath;
    }
}