王飞
2025-01-23 2de56e472a41b7feb90be29a54a2d6f5a6c8762e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.hxzkappboot.util;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
@Configuration
public class WebConfig implements WebMvcConfigurer {
 
    @Autowired
    private JwtInterceptor tokenInterceptor;
 
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(tokenInterceptor).addPathPatterns("/**")
                .excludePathPatterns("/api/wx/login", "/api/wx/checkLogin","/api/wx/findWarningNum","/api/wx/addpicqwe","/public/**");
    }
}