增加兼容属性配置.
This commit is contained in:
parent
44575af46e
commit
ce78400cbd
@ -335,10 +335,15 @@ public class MybatisPlusProperties {
|
||||
*/
|
||||
private Properties variables;
|
||||
|
||||
// 新增兼容开始...
|
||||
// 新增兼容开始... mybatis 3.x 的有做属性删减 部分属性在2.x可用 3.x 已经被剔除了.
|
||||
/**
|
||||
* Specifies the language used by default for dynamic SQL generation.
|
||||
*/
|
||||
private Class<? extends LanguageDriver> defaultScriptingLanguageDriver;
|
||||
|
||||
protected String databaseId;
|
||||
private String databaseId;
|
||||
|
||||
private Boolean useGeneratedShortKey;
|
||||
|
||||
public void applyTo(Configuration target) {
|
||||
PropertyMapper mapper = PropertyMapper.get().alwaysApplyingWhenNonNull();
|
||||
@ -375,6 +380,7 @@ public class MybatisPlusProperties {
|
||||
mapper.from(getDefaultEnumTypeHandler()).to(target::setDefaultEnumTypeHandler);
|
||||
mapper.from(getDefaultScriptingLanguageDriver()).to(target::setDefaultScriptingLanguage);
|
||||
mapper.from(getDatabaseId()).to(target::setDatabaseId);
|
||||
mapper.from(getUseGeneratedShortKey()).to(target::setUseGeneratedKeys);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user