|
@@ -3,6 +3,7 @@ package com.ym.mec.auth.config;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import com.ym.mec.auth.interceptor.TenantInterceptor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
@@ -22,8 +23,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|
|
@Autowired
|
|
|
private OperationLogInterceptor operationLogInterceptor;
|
|
|
|
|
|
-// @Autowired
|
|
|
-// private TenantInterceptor tenantInterceptor;
|
|
|
+ @Autowired
|
|
|
+ private TenantInterceptor tenantInterceptor;
|
|
|
|
|
|
/**
|
|
|
* 枚举类的转换器 addConverterFactory
|
|
@@ -35,7 +36,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|
|
|
|
|
@Override
|
|
|
public void addInterceptors(InterceptorRegistry registry) {
|
|
|
-// registry.addInterceptor(tenantInterceptor).addPathPatterns("/**");
|
|
|
+ registry.addInterceptor(tenantInterceptor).addPathPatterns("/**").excludePathPatterns("/queryUserInfo");
|
|
|
registry.addInterceptor(operationLogInterceptor).addPathPatterns("/userDevice/unbind").excludePathPatterns("/*");
|
|
|
}
|
|
|
|