|
@@ -4,6 +4,7 @@ import com.ym.mec.common.config.EnumConverterFactory;
|
|
|
import com.ym.mec.common.config.LocalFastJsonHttpMessageConverter;
|
|
|
import com.ym.mec.teacher.interceptor.MDCInterceptor;
|
|
|
import com.ym.mec.teacher.interceptor.OperationLogInterceptor;
|
|
|
+import com.ym.mec.teacher.interceptor.TenantInterceptor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
@@ -24,8 +25,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|
|
|
|
|
@Autowired
|
|
|
private OperationLogInterceptor operationLogInterceptor;
|
|
|
-// @Autowired
|
|
|
-// private TenantInterceptor tenantInterceptor;
|
|
|
+ @Autowired
|
|
|
+ private TenantInterceptor tenantInterceptor;
|
|
|
|
|
|
@Override
|
|
|
public void addInterceptors(InterceptorRegistry registry) {
|
|
@@ -33,7 +34,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|
|
includePathPatterns.add("/**");
|
|
|
List<String> excludePathPatterns = new ArrayList<String>();
|
|
|
excludePathPatterns.add("/login");
|
|
|
-// registry.addInterceptor(tenantInterceptor).addPathPatterns("/**");
|
|
|
+ registry.addInterceptor(tenantInterceptor).addPathPatterns("/**");
|
|
|
registry.addInterceptor(mdcInterceptor).addPathPatterns(includePathPatterns).excludePathPatterns(excludePathPatterns);
|
|
|
|
|
|
// registry.addInterceptor(operationLogInterceptor).addPathPatterns("/**").excludePathPatterns("/login");
|