2. tenant 组件:feign 调用时,通过 header 透传 Tenant 信息
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package cn.iocoder.yudao.module.infra.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.RpcConstants;
|
||||
|
||||
/**
|
||||
* API 相关的枚举
|
||||
*
|
||||
@@ -14,7 +16,7 @@ public class ApiConstants {
|
||||
*/
|
||||
public static final String NAME = "infra-server";
|
||||
|
||||
public static final String PREFIX = "/rpc-api/system";
|
||||
public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/system";
|
||||
|
||||
public static final String VERSION = "1.0.0";
|
||||
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-biz-tenant</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package cn.iocoder.yudao.module.infra.framework;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkService;
|
||||
import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService;
|
||||
import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateReqDTO;
|
||||
import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateReqDTO;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.dto.OperateLogCreateReqDTO;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService;
|
||||
import cn.iocoder.yudao.module.infra.api.file.FileApi;
|
||||
import cn.iocoder.yudao.framework.tenant.core.service.TenantFrameworkService;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
@Configuration
|
||||
@@ -25,4 +22,19 @@ public class TmpConfiguration {
|
||||
};
|
||||
}
|
||||
|
||||
@Bean
|
||||
public TenantFrameworkService tenantFrameworkService() {
|
||||
return new TenantFrameworkService() {
|
||||
@Override
|
||||
public List<Long> getTenantIds() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validTenant(Long id) {
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user