提交 0cb058ee 编写于 作者: ibiz4j's avatar ibiz4j

临时修复packageName错误

上级 173b6c8f
package cn.ibizlab.codegen.templating; package cn.ibizlab.codegen.templating;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -160,6 +161,11 @@ public class TemplateManager implements TemplatingExecutor, TemplateProcessor { ...@@ -160,6 +161,11 @@ public class TemplateManager implements TemplatingExecutor, TemplateProcessor {
@Override @Override
public String targetPath(Map<String, Object> data, String template) throws IOException { public String targetPath(Map<String, Object> data, String template) throws IOException {
template=template.replace("{{packageName}}","{{packagePath}}");
if(!ObjectUtils.isEmpty(data.get("packageName")))
{
data.put("packagePath",data.get("packageName").toString().replace(".","/"));
}
String templateContent = this.engineAdapter.compilePath(this, data, template); String templateContent = this.engineAdapter.compilePath(this, data, template);
return templateContent; return templateContent;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册