Commit 10ce5370 authored by Quxl's avatar Quxl

x

parent 1933d91b
......@@ -5,6 +5,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.egolm.shop.config.interceptor.LogInterceptor;
import com.egolm.shop.config.interceptor.OpenInterceptor;
@Configuration
......@@ -12,6 +13,9 @@ public class WebMvcConfig implements WebMvcConfigurer {
@Autowired
OpenInterceptor openInterceptor;
@Autowired
LogInterceptor logInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
......@@ -19,6 +23,11 @@ public class WebMvcConfig implements WebMvcConfigurer {
/*System.out.println("-addInterceptors------");
registry.addInterceptor(openInterceptor).excludePathPatterns("api/path/login");
super.addInterceptors(registry); */
registry.addInterceptor(logInterceptor).addPathPatterns("*");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment