liujie
2026-07-10 bedff910eb2394a8ce68762a8f3a413d81187ac1
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java
@@ -13,6 +13,7 @@
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.framework.interceptor.MiddlePlatformReadonlyInterceptor;
import com.ruoyi.framework.interceptor.RepeatSubmitInterceptor;
/**
@@ -25,6 +26,9 @@
{
    @Autowired
    private RepeatSubmitInterceptor repeatSubmitInterceptor;
    @Autowired
    private MiddlePlatformReadonlyInterceptor middlePlatformReadonlyInterceptor;
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry)
@@ -45,6 +49,20 @@
    @Override
    public void addInterceptors(InterceptorRegistry registry)
    {
        // 中台模式只读拦截必须覆盖原生部门接口,部门页面使用 /system/dept 而不是访客自定义前缀。
        registry.addInterceptor(middlePlatformReadonlyInterceptor).addPathPatterns(
                "/system/visit/area/**",
                "/system/dept",
                "/system/dept/**",
                "/system/employee/**",
                "/system/visitor/record/**",
                "/system/visitor/machine/**",
                "/system/door/device/**",
                "/system/version/update/**",
                "/system/protocol/config/**",
                "/system/platform/admin/**",
                "/system/role/manage/**"
        );
        registry.addInterceptor(repeatSubmitInterceptor).addPathPatterns("/**");
    }
@@ -70,4 +88,4 @@
        // 返回新的CorsFilter
        return new CorsFilter(source);
    }
}
}