大屏项目初始化

This commit is contained in:
2026-02-24 23:26:41 +08:00
commit 412e2ac1f7
236 changed files with 5907 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package com.mini.mybigscreen.Config;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
@Component
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) {
response.sendRedirect(request.getContextPath() + "/index.html");
return false;
}
return true;
}
}