Commit ec5d3d42 authored by Quxl's avatar Quxl

x

parent 30710fab
......@@ -2,6 +2,7 @@ package com.egolm.shop.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
......@@ -19,7 +20,9 @@ public class WebMvcConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(logInterceptor).addPathPatterns("/**");
InterceptorRegistration logsRegistration = registry.addInterceptor(logInterceptor).addPathPatterns("/**");
logsRegistration.excludePathPatterns("/", "/**.*", "/error");
logsRegistration.excludePathPatterns("/csrf", "/swagger-resources/**", "/webjars/**");
}
}
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