From a3b52118de8bf0cf8c885822299374a429b25ee4 Mon Sep 17 00:00:00 2001 From: LiuZhiFeng <2813290213@qq.com> Date: Tue, 4 Jul 2023 10:09:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=86=85=E5=AD=98=E6=B3=84=E9=9C=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mallchat/custom/common/intecepter/TokenInterceptor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mallchat-custom-server/src/main/java/com/abin/mallchat/custom/common/intecepter/TokenInterceptor.java b/mallchat-custom-server/src/main/java/com/abin/mallchat/custom/common/intecepter/TokenInterceptor.java index 719fb0d..814297b 100644 --- a/mallchat-custom-server/src/main/java/com/abin/mallchat/custom/common/intecepter/TokenInterceptor.java +++ b/mallchat-custom-server/src/main/java/com/abin/mallchat/custom/common/intecepter/TokenInterceptor.java @@ -45,6 +45,11 @@ public class TokenInterceptor implements HandlerInterceptor { return true; } + @Override + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { + MDC.remove(MDCKey.UID); + } + /** * 判断是不是公共方法,可以未登录访问的 *