club.zhcs.lina.trace.config.InterceptorConfig Maven / Gradle / Ivy
The newest version!
package club.zhcs.lina.trace.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.lang.NonNull;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import club.zhcs.lina.trace.interceptor.TraceInterceptor;
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
@Bean
public TraceInterceptor initTraceInterceptor() {
return new TraceInterceptor();
}
@Override
public void addInterceptors(@NonNull InterceptorRegistry registry) {
registry.addInterceptor(initTraceInterceptor()).addPathPatterns("/**");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy