Skip to content

Commit

Permalink
增加一个自定义配置项兼容项.
Browse files Browse the repository at this point in the history
  • Loading branch information
nieqiurong committed Jun 4, 2023
1 parent 5412d3e commit 469a84e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public class InjectionConfig {
public void beforeOutputFile(TableInfo tableInfo, Map<String, Object> objectMap) {
if (!customMap.isEmpty()) {
objectMap.putAll(customMap);
//增加一个兼容兼容取值,推荐还是直接取值外置key即可,例如abc取值${abc}而不需要${cfg.abc}
objectMap.put("cfg", customMap);
}
if (null != beforeOutputFileBiConsumer) {
beforeOutputFileBiConsumer.accept(tableInfo, objectMap);
Expand Down

0 comments on commit 469a84e

Please sign in to comment.