From 3374d19db03cce97572c3a294f137d1ea70b307f Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期四, 12 十二月 2024 13:26:05 +0800 Subject: [PATCH] Merge branch 'master' of http://dlindusit.com:53929/r/iailab-plat --- iailab-framework/iailab-common-biz-tenant/src/main/java/com/iailab/framework/tenant/config/IailabTenantAutoConfiguration.java | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/iailab-framework/iailab-common-biz-tenant/src/main/java/com/iailab/framework/tenant/config/IailabTenantAutoConfiguration.java b/iailab-framework/iailab-common-biz-tenant/src/main/java/com/iailab/framework/tenant/config/IailabTenantAutoConfiguration.java index 285c740..14060f8 100644 --- a/iailab-framework/iailab-common-biz-tenant/src/main/java/com/iailab/framework/tenant/config/IailabTenantAutoConfiguration.java +++ b/iailab-framework/iailab-common-biz-tenant/src/main/java/com/iailab/framework/tenant/config/IailabTenantAutoConfiguration.java @@ -1,10 +1,13 @@ package com.iailab.framework.tenant.config; +import com.baomidou.dynamic.datasource.processor.DsProcessor; +import com.baomidou.dynamic.datasource.processor.DsSpelExpressionProcessor; import com.iailab.framework.common.enums.WebFilterOrderEnum; import com.iailab.framework.mybatis.core.util.MyBatisUtils; import com.iailab.framework.redis.config.IailabCacheProperties; import com.iailab.framework.tenant.core.aop.TenantIgnoreAspect; import com.iailab.framework.tenant.core.db.TenantDatabaseInterceptor; +import com.iailab.framework.tenant.core.db.dynamic.TenantDsProcessor; import com.iailab.framework.tenant.core.job.TenantJobAspect; import com.iailab.framework.tenant.core.mq.rabbitmq.TenantRabbitMQInitializer; import com.iailab.framework.tenant.core.mq.redis.TenantRedisMessageInterceptor; @@ -65,6 +68,18 @@ return inner; } + @Bean + public DsProcessor dsProcessor( +// TenantFrameworkService tenantFrameworkService, +// DataSource dataSource, +// DefaultDataSourceCreator dataSourceCreator + ) { +// TenantDsProcessor tenantDsProcessor = new TenantDsProcessor(tenantFrameworkService, dataSourceCreator); + TenantDsProcessor tenantDsProcessor = new TenantDsProcessor(); + tenantDsProcessor.setNextProcessor(new DsSpelExpressionProcessor()); + return tenantDsProcessor; + } + // ========== WEB ========== @Bean -- Gitblit v1.9.3