智慧保安后台管理-外网项目备份
zhongrj
2023-09-17 8853292babb2ad94de4a3207966f1e83b767cd2d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package org.springblade.modules.signature.interceptor;
 
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
 
/**
 * 拦截器
 * @author zhongrj
 * @time 2022-03-10
 */
@Configuration
public class ExternalAdapter extends WebMvcConfigurationSupport {
 
    /**
     * 新增拦截
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new ExternalInterceptor()).
            addPathPatterns("/simulateExamRecord/getSimulateExamRecordInfo",
                            "/simulateExamRecord/pauseExam",
                            "/simulateExamRecord/getSimulateExamRefreshInfo",
                            "/simulateExamRecord/beginExam",
                            "/simulateExamRecord/saveSimulateExam",
                            "/examSubjectChoices/getSubjectResultInfoBySimulate",
                            "/blade-user/getNotUpdatePwdInfo",
                            "/electronRail/**",
                            "/attendance/AppSave"
                );
        super.addInterceptors(registry);
    }
 
    @Bean
    public ExternalInterceptor getExternalInterceptor(){
        return new ExternalInterceptor();
    }
}