mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
fix: 代码生成器为做自定义配置时,生成代码 NPE 的问题; close #I88UIZ
This commit is contained in:
parent
9c204fbcb0
commit
03b0f839cf
@ -53,9 +53,8 @@ public class GlobalConfig implements Serializable {
|
|||||||
private TableDefConfig tableDefConfig;
|
private TableDefConfig tableDefConfig;
|
||||||
private MapperXmlConfig mapperXmlConfig;
|
private MapperXmlConfig mapperXmlConfig;
|
||||||
|
|
||||||
// === 其他配置 ===
|
// === 其他自定义配置 ===
|
||||||
|
private Map<String, Object> customConfig = new HashMap<>();
|
||||||
private Map<String, Object> customConfig;
|
|
||||||
|
|
||||||
// === 是否启用生成 ===
|
// === 是否启用生成 ===
|
||||||
|
|
||||||
@ -220,16 +219,10 @@ public class GlobalConfig implements Serializable {
|
|||||||
// === 自定义配置 ===
|
// === 自定义配置 ===
|
||||||
|
|
||||||
public Object getCustomConfig(String key) {
|
public Object getCustomConfig(String key) {
|
||||||
if (customConfig != null) {
|
return customConfig.get(key);
|
||||||
return customConfig.get(key);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCustomConfig(String key, Object value) {
|
public void setCustomConfig(String key, Object value) {
|
||||||
if (customConfig == null) {
|
|
||||||
customConfig = new HashMap<>();
|
|
||||||
}
|
|
||||||
customConfig.put(key, value);
|
customConfig.put(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user