方案一:采用jsp方式检测用户信息跳转

<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.bim.bdip.cloud.home.model.BimUser"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
// 判断session中的值
BimUser bimUser = (BimUser)request.getSession().getAttribute("LoginSessionUser");
if(bimUser==null) {
    %>
    <script type="text/javascript">
    var basePath = '<%=basePath %>';
    top.location.href = basePath + '/page/bdip/user/logins';
    </script>
    <%
}
%>

方案二 :采用springmvc 的拦截器

方案三 : 采用shiro过滤器

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-08
  • 2022-02-16
  • 2021-12-19
  • 2021-08-12
  • 2021-12-24
  • 2021-12-19
猜你喜欢
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-05-30
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案