zhaowenxuan
2025-02-07 791b8c88d67767c9847c7c052faca3e65ec36016
ltkj-framework/src/main/java/com/ltkj/framework/config/WebConfig.java
@@ -1,5 +1,7 @@
package com.ltkj.framework.config;
import com.ltkj.framework.interceptor.DBChangeInterceptor;
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;
@@ -11,6 +13,10 @@
//定义拦截器
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private DBChangeInterceptor dbChangeInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new TokenInterceptor())
@@ -24,5 +30,8 @@
                        "/lis/**","/api/His/**","/pacs/**",
                        "/callBack/**"
                });
        registry.addInterceptor(dbChangeInterceptor)
                .addPathPatterns("/**");
    }
}