From c31aa02aff77624c67f49a19d0d0b6af0c82db50 Mon Sep 17 00:00:00 2001 From: msb_89821 Date: Mon, 17 Oct 2022 22:46:06 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E5=AE=9E=E7=8E=B0=E5=8A=9F=E8=83=BD1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/mashibing/online/text/intercept/JwtIntercept.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/oneLineTxt/v1/onelinetextplublic/api-passinger/src/main/java/mashibing/online/text/intercept/JwtIntercept.java b/oneLineTxt/v1/onelinetextplublic/api-passinger/src/main/java/mashibing/online/text/intercept/JwtIntercept.java index 0805be2..cdf7448 100644 --- a/oneLineTxt/v1/onelinetextplublic/api-passinger/src/main/java/mashibing/online/text/intercept/JwtIntercept.java +++ b/oneLineTxt/v1/onelinetextplublic/api-passinger/src/main/java/mashibing/online/text/intercept/JwtIntercept.java @@ -1,15 +1,20 @@ package mashibing.online.text.intercept; +import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.web.servlet.HandlerInterceptor; +import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class JwtIntercept implements HandlerInterceptor { + @Resource + private StringRedisTemplate stringRedisTemplate; + @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { - + String token = request.getHeader("Authorization"); return HandlerInterceptor.super.preHandle(request, response, handler); }