lyh
14 小时以前 7126eab629d31beb5164b576a44b865a6a00f07c
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
27
package com.lxzn.config;
 
import com.lxzn.interceptor.LicenseInterceptor;
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.WebMvcConfigurer;
 
/**
 * @Description:
 * @Author: zhangherong
 * @Date: Created in 2021/6/17 17:19
 * @Version: 1.0
 * @Modified By:
 */
@Configuration
@Slf4j
public class LicenseInterceptorConfig implements WebMvcConfigurer {
 
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LicenseInterceptor())
                //拦截的路径
                .addPathPatterns("/**")
                .excludePathPatterns("/auth/user/logout", "/websocket/**","outer/**");
    }
}