parent
ca6e7a4528
commit
f08fe24174
@ -0,0 +1,17 @@
|
|||||||
|
package cn.iocoder.yudao.framework.tenant.config;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.tenant.core.rpc.TenantRequestInterceptor;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@ConditionalOnProperty(prefix = "yudao.tenant", value = "enable", matchIfMissing = true) // 允许使用 yudao.tenant.enable=false 禁用多租户
|
||||||
|
public class YudaoTenantRpcAutoConfiguration {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public TenantRequestInterceptor tenantRequestInterceptor() {
|
||||||
|
return new TenantRequestInterceptor();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,2 +1,3 @@
|
|||||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||||
|
cn.iocoder.yudao.framework.tenant.config.YudaoTenantRpcAutoConfiguration,\
|
||||||
cn.iocoder.yudao.framework.tenant.config.YudaoTenantAutoConfiguration
|
cn.iocoder.yudao.framework.tenant.config.YudaoTenantAutoConfiguration
|
||||||
|
|||||||
Loading…
Reference in new issue