zjh
2025-02-13 b617984e5e6b17b23b5eec204ba73d63316c9a35
ltkj-framework/src/main/java/com/ltkj/framework/config/WebConfig.java
@@ -1,6 +1,10 @@
package com.ltkj.framework.config;
//import com.ltkj.framework.interceptor.DBChangeInterceptor;
import com.ltkj.framework.interceptor.DBChangeInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@@ -11,6 +15,10 @@
//定义拦截器
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private DBChangeInterceptor dbChangeInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new TokenInterceptor())
@@ -22,8 +30,21 @@
                        "/cus/package/projectListByPacId/**",
                        "/cus/hospital/getHospList",
                        "/lis/**","/api/His/**","/pacs/**",
                        "/callBack/**",
                        "/hosp/order/signOrderInfo"
                        "/callBack/**"
                });
        registry.addInterceptor(dbChangeInterceptor)
                .addPathPatterns("/**")
                .excludePathPatterns(new String[]{
                        "/system/dict/data/**",
                        "/system/dict/type/**",
                        "/captchaImage","/getCaptchaConfigKey/**",
                        "/system/role/execUpdateSql",
                        "/report/jmreport/**",
                        "/jmreport/**",
                        "/swagger-ui.html",
                        "/swagger-resources/**",
                        "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**","/tool/**"
                });
    }
}