|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|