update 优化 多租户插件初始化流程
This commit is contained in:
parent
8cd30ae86b
commit
112157ade0
@ -32,13 +32,18 @@ import org.springframework.context.annotation.Primary;
|
|||||||
@ConditionalOnProperty(value = "tenant.enable", havingValue = "true")
|
@ConditionalOnProperty(value = "tenant.enable", havingValue = "true")
|
||||||
public class TenantConfig {
|
public class TenantConfig {
|
||||||
|
|
||||||
/**
|
|
||||||
* 多租户插件
|
|
||||||
*/
|
|
||||||
@ConditionalOnClass(TenantLineInnerInterceptor.class)
|
@ConditionalOnClass(TenantLineInnerInterceptor.class)
|
||||||
@Bean
|
@AutoConfiguration
|
||||||
public TenantLineInnerInterceptor tenantLineInnerInterceptor(TenantProperties tenantProperties) {
|
static class MybatisPlusConfiguration {
|
||||||
return new TenantLineInnerInterceptor(new PlusTenantLineHandler(tenantProperties));
|
|
||||||
|
/**
|
||||||
|
* 多租户插件
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
public TenantLineInnerInterceptor tenantLineInnerInterceptor(TenantProperties tenantProperties) {
|
||||||
|
return new TenantLineInnerInterceptor(new PlusTenantLineHandler(tenantProperties));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
Loading…
x
Reference in New Issue
Block a user