package com.neusoft.smart.pos.framework.config;

import com.neusoft.smart.pos.framework.interceptor.SessionInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author zcf
 * @date 2017-09-19
 * @description 应用拦截器配置
 */
@Configuration
public class ApplicationInterceptorConfig extends WebMvcConfigurerAdapter {

	@Override
    public void addInterceptors(InterceptorRegistry registry) {
        //添加session拦截器
        registry.addInterceptor(new SessionInterceptor()).addPathPatterns("/**");  //对来自/temp/** 这个链接来的请求进行拦截
    }
	
}

