package com.yihu.hos.config; import com.yihu.hos.interceptor.WebMvcInterceptor; import org.springframework.stereotype.Component; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; /** * web 请求拦截 * @author HZY * @vsrsion 1.0 * Created at 2016/12/26. */ @Component public class WebMvcConfig extends WebMvcConfigurerAdapter { @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new WebMvcInterceptor()); } }