k94314517
2025-05-06 2c4ea94474ce8f9eb48b71fb9960a7da45320282
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.doumee.core.annotation.trace;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
/**
 * 跟踪拦截器配置
 * @author Eva.Caesar Liu
 * @date 2023/03/21 14:49
 */
@Configuration
public class TraceInterceptorConfig implements WebMvcConfigurer {
 
    @Autowired
    private TraceInterceptor logInterceptor;
 
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(logInterceptor).addPathPatterns("/**");
    }
}