doum
2025-09-28 9ab109b9ee96e7ff2bf2b935a044aee5842a3ddc
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.pr;
 
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;
 
/**
 * Swagger拦截器配置
 * @author Eva.Caesar Liu
 * @date 2023/03/21 14:49
 */
@Configuration
public class PreventRepeatInterceptorConfig implements WebMvcConfigurer {
 
    @Autowired
    private PreventRepeatInterceptor preventRepeatInterceptor;
 
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(preventRepeatInterceptor).addPathPatterns("/**");
    }
}