ludc
2023-09-13 4a2835ddadb796c69f180097b95f971dbab4687d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.vci.ubcs.code.config;
 
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
/**
 * webservice接口拦截器
 * @author ludc
 * @date 2023/9/12 11:16
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
 
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AuthenticationInterceptor())
            .addPathPatterns("/api/protected/**");
    }
 
}