package com.liangjian.dataplatform.member.config;

import com.liangjian.dataplatform.member.interceptor.WeixinInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: 黄子奇
 * @Date: 2019/11/27
 */
@Configuration
public class WeixinInterceptorConfig implements WebMvcConfigurer {
    @Autowired
    private WeixinInterceptor weixinInterceptor;

    //添加拦截器
    @Override
    public void addInterceptors(InterceptorRegistry registry){
        registry.addInterceptor(weixinInterceptor);
    }
}
