!505 mybatis-flex-solon-plugin 调整 FlexGlobalConfig:defaultConfig 的使用方式

Merge pull request !505 from 西东/main
This commit is contained in:
Michael Yang 2024-12-03 02:36:26 +00:00 committed by Gitee
commit e8a24973d7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -77,8 +77,15 @@ public class MybatisAdapterFlex extends MybatisAdapterDefault {
//for globalConfig section
if (dsWrap.typed()) {
globalConfig = FlexGlobalConfig.getDefaultConfig();
} else {
globalConfig = new FlexGlobalConfig();
}
if (globalConfig.getKeyConfig() == null) {
globalConfig.setKeyConfig(new FlexGlobalConfig.KeyConfig());
}
Props globalProps = dsProps.getProp("globalConfig");
if (globalProps.size() > 0) {
@ -91,11 +98,6 @@ public class MybatisAdapterFlex extends MybatisAdapterDefault {
//增加事件扩展机制
EventBus.publish(globalConfig);
if (dsWrap.typed()) {
FlexGlobalConfig.setDefaultConfig(globalConfig);
}
}
/**
@ -132,5 +134,4 @@ public class MybatisAdapterFlex extends MybatisAdapterDefault {
varH.setValue(rowMapperInvoker);
}
}
}