疯狂的狮子Li
2024-10-29 112157ade0e33e6406ede5a0d1c38fa165f5989e
update 优化 多租户插件初始化流程
已修改1个文件
17 ■■■■■ 文件已修改
ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/config/TenantConfig.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/config/TenantConfig.java
@@ -32,13 +32,18 @@
@ConditionalOnProperty(value = "tenant.enable", havingValue = "true")
public class TenantConfig {
    /**
     * 多租户插件
     */
    @ConditionalOnClass(TenantLineInnerInterceptor.class)
    @Bean
    public TenantLineInnerInterceptor tenantLineInnerInterceptor(TenantProperties tenantProperties) {
        return new TenantLineInnerInterceptor(new PlusTenantLineHandler(tenantProperties));
    @AutoConfiguration
    static class MybatisPlusConfiguration {
        /**
         * 多租户插件
         */
        @Bean
        public TenantLineInnerInterceptor tenantLineInnerInterceptor(TenantProperties tenantProperties) {
            return new TenantLineInnerInterceptor(new PlusTenantLineHandler(tenantProperties));
        }
    }
    @Bean