//AbstractTemplateEngine
// 注入自定义配置,可以在 VM 中使用 cfg.abc 设置的值
InjectionConfig cfg = new InjectionConfig() {
@Override
public void initMap() {
Map<String, Object> map = new HashMap<>();
map.put("abc", this.getConfig().getGlobalConfig().getAuthor() + "-mp");
this.setMap(map);
}
};
mpg.setCfg(cfg);
// 自定义 文件生成
List<FileOutConfig> focList = new ArrayList<>();
focList.add(new FileOutConfig("html模板路径") {
//生成html
@Override
public String outputFile(TableInfo tableInfo) {
// TODO Auto-generated method stub
return 保存路径 + tableInfo.getEntityPath() + ".html";
}
});
cfg.setFileOutConfigList(focList);
mpg.setCfg(cfg);//AutoGenerator mpg = new AutoGenerator();