From 151ab5676b76711854b3e0cf0ed32afb8e8dcbf0 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Thu, 29 Jun 2023 14:18:45 +0800
Subject: [PATCH] 目录订阅更新移动位置去除
---
src/main/java/com/genersoft/iot/vmp/conf/security/InvalidSessionHandler.java | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/conf/security/InvalidSessionHandler.java b/src/main/java/com/genersoft/iot/vmp/conf/security/InvalidSessionHandler.java
new file mode 100644
index 0000000..f3fd068
--- /dev/null
+++ b/src/main/java/com/genersoft/iot/vmp/conf/security/InvalidSessionHandler.java
@@ -0,0 +1,24 @@
+package com.genersoft.iot.vmp.conf.security;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.security.web.session.InvalidSessionStrategy;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * 登录超时的处理
+ */
+public class InvalidSessionHandler implements InvalidSessionStrategy {
+
+ private final static Logger logger = LoggerFactory.getLogger(InvalidSessionHandler.class);
+
+ @Override
+ public void onInvalidSessionDetected(HttpServletRequest request, HttpServletResponse httpServletResponse) throws IOException, ServletException {
+ String username = request.getParameter("username");
+ logger.info("[登录超时] - [{}]", username);
+ }
+}
--
Gitblit v1.9.3