From 543b893fe540bf30004734773d71ddfb1c45afb5 Mon Sep 17 00:00:00 2001 From: gaoyongyou Date: Fri, 26 Aug 2022 16:55:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=9F=E6=88=B7=E6=8E=A5=E5=8F=A3=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=A4=96=E9=83=A8=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/iec/edp/caf/tenancy/config/TenantAutoConfiguration.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/caf-boot-starters/caf-boot-starter-tenancy/src/main/java/io/iec/edp/caf/tenancy/config/TenantAutoConfiguration.java b/caf-boot-starters/caf-boot-starter-tenancy/src/main/java/io/iec/edp/caf/tenancy/config/TenantAutoConfiguration.java index cf08f27d..a74498f9 100644 --- a/caf-boot-starters/caf-boot-starter-tenancy/src/main/java/io/iec/edp/caf/tenancy/config/TenantAutoConfiguration.java +++ b/caf-boot-starters/caf-boot-starter-tenancy/src/main/java/io/iec/edp/caf/tenancy/config/TenantAutoConfiguration.java @@ -29,6 +29,7 @@ import io.iec.edp.caf.tenancy.core.extensions.TenantDataSourceIdentifierResolver import io.iec.edp.caf.tenancy.core.properties.MultiTenantProperties; import io.iec.edp.caf.tenancy.core.repository.*; import io.iec.edp.caf.tenancy.core.service.*; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.ApplicationEventPublisher; @@ -102,6 +103,7 @@ public class TenantAutoConfiguration { return new TenantManager(repository, tenantCache); } + @ConditionalOnMissingBean(ITenantService.class) @Bean public ITenantService tenantService(MultiTenantProperties properties, TenantManager tenantmgr, DbMappingManager dbMappingMgr, DbConnectionManager dbMgr, TenantAppInstanceMgr appInstMgr, ClusterManager clusterMgr) { -- Gitee