| | |
| | | |
| | | import com.xiaopeng.unifiedverification.interceptor.CheckForClientInterceptor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @Configuration |
| | | public class WebMvcConfigurer extends WebMvcConfigurerAdapter { |
| | | public class WebMvcConfigurer implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer { |
| | | |
| | | @Resource |
| | | @Autowired |
| | | @Lazy |
| | | private CheckForClientInterceptor checkForClientInterceptor; |
| | | |
| | | @Override |
| | | public void addInterceptors(InterceptorRegistry registry) { |
| | | // 统一验证服务拦截器 |
| | | registry.addInterceptor(checkForClientInterceptor).addPathPatterns("/vehicle/v1/**"); |
| | | super.addInterceptors(registry); |
| | | } |
| | | |
| | | } |