update 优化 多租户插件初始化流程

master
疯狂的狮子Li 1 year ago
parent 8cd30ae86b
commit 112157ade0

@ -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

Loading…
Cancel
Save