Skip to content

Commit

Permalink
fix: 重定向到登录页
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyueyi committed Jun 4, 2023
1 parent 67989b1 commit d0b6817
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons
}
if (ReqInfoContext.getReqInfo() == null || ReqInfoContext.getReqInfo().getUserId() == null) {
if (request.getRequestURI().startsWith("/api/admin/") || request.getRequestURI().startsWith("/admin/")){
response.sendRedirect("/admin-view");
response.sendRedirect("/admin-view/#/login");
} else if (handlerMethod.getMethod().getAnnotation(ResponseBody.class) != null
|| handlerMethod.getMethod().getDeclaringClass().getAnnotation(RestController.class) != null) {
// 访问需要登录的rest接口
Expand Down

0 comments on commit d0b6817

Please sign in to comment.