jinpengyong
2021-03-10 b1f6eded803531719005275065acc3f205b19298
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package com.moral.api.config.Interceptor;
 
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
import com.moral.api.interceptor.AuthenticationInterceptor;
 
@Configuration
public class WebAppConfiguration implements WebMvcConfigurer {
 
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AuthenticationInterceptor())
                .addPathPatterns("/**")
                .excludePathPatterns("/**/login/**", "/**/logout/**", "/swagger-ui.html/**", "/swagger-resources/**");
    }
}