mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 08:13:44 +08:00 
			
		
		
		
	update 优化 多租户插件初始化流程
This commit is contained in:
		@@ -32,13 +32,18 @@ import org.springframework.context.annotation.Primary;
 | 
			
		||||
@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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user