zjh
2024-04-02 4884f2bc65c73ce5c25f8efee0d1f2a27663a57e
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.ltkj.framework.config;
 
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
/**
 * @Author: 西安路泰科技有限公司/赵佳豪
 * @Date: 2022/11/17 10:35
 */
//定义拦截器
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new TokenInterceptor())
                .addPathPatterns("/cus/**")
                .excludePathPatterns(new String[]{
                        "/cus/wx/login","/cus/order/pay-notify",
                        "/cus/banner/getBannerList",
                        "/cus/package/getPackageList",
                        "/cus/package/projectListByPacId/**",
                        "/cus/hospital/getHospList"
                });
    }
}