package com.yeejoin.amos.boot.module.jg.biz.interceptor;

import com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author Administrator
 */
public class ClearThreadLocalInterceptor implements HandlerInterceptor {

    @Override
    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
                           ModelAndView modelAndView) {
        // 清除ThreadLocal变量
        FlowingEquipRedisContext.clean();
    }


}