zhouhn
2026-02-27 70c0cc7ac8a9580b3fdcc8465cfb2e09a98cf471
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.xiaopeng.automaticPilot.config;
 
 
import com.xiaopeng.unifiedverification.interceptor.CheckForClientInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
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 {
 
    @Resource
    private CheckForClientInterceptor checkForClientInterceptor;
 
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 统一验证服务拦截器
        registry.addInterceptor(checkForClientInterceptor).addPathPatterns("/vehicle/v1/**");
        super.addInterceptors(registry);
    }
 
}