Pre Merge pull request !630 from DoubleH/update-优化多租户插件初始化
This commit is contained in:
commit
5ab58fb134
@ -37,8 +37,11 @@ public class MybatisPlusConfig {
|
|||||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||||
// 多租户插件 必须放到第一位
|
// 多租户插件 必须放到第一位
|
||||||
try {
|
try {
|
||||||
TenantLineInnerInterceptor tenant = SpringUtils.getBean(TenantLineInnerInterceptor.class);
|
boolean enableTenant = Boolean.parseBoolean(SpringUtils.getProperty("tenant.enable"));
|
||||||
interceptor.addInnerInterceptor(tenant);
|
if (enableTenant) {
|
||||||
|
TenantLineInnerInterceptor tenant = SpringUtils.getBean(TenantLineInnerInterceptor.class);
|
||||||
|
interceptor.addInnerInterceptor(tenant);
|
||||||
|
}
|
||||||
} catch (BeansException ignore) {
|
} catch (BeansException ignore) {
|
||||||
}
|
}
|
||||||
// 数据权限处理
|
// 数据权限处理
|
||||||
|
Loading…
x
Reference in New Issue
Block a user