111
k94314517
2025-07-09 d5984685e7efd46a5e850ade13b22fa727163a47
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  dm
 * @since 2025/03/31 16:44
 */
@Configuration
public class TraceInterceptorConfig implements WebMvcConfigurer {
 
    @Autowired
    private TraceInterceptor logInterceptor;
 
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(logInterceptor).addPathPatterns("/**");
    }
}