fix: 修改自动生成代码的存放路径
This commit is contained in:
parent
111473f057
commit
7b1365b5cd
@ -48,8 +48,8 @@ public class CodeGenerator {
|
||||
})
|
||||
.packageConfig(builder -> {
|
||||
//设置父包名
|
||||
builder.parent("com.cnbm")
|
||||
.moduleName("generator")
|
||||
builder.parent("com.cnbm.generator")
|
||||
.moduleName("code")
|
||||
.service("service")
|
||||
.serviceImpl("service.impl")
|
||||
.entity("entity")
|
||||
|
@ -24,10 +24,10 @@ public class EnhanceVelocityTemplateEngine extends VelocityTemplateEngine {
|
||||
customFile.forEach((key, value) -> {
|
||||
String fileName = "";
|
||||
if ("DTO".equals(key)) {
|
||||
fileName = String.format((path+ File.separator +"src/main/java/com/cnbm/generator"+ File.separator + "dto" + File.separator + entityName + "%s" + ".java"), key);
|
||||
fileName = String.format((path+ File.separator +"src/main/java/com/cnbm/generator/code"+ File.separator + "dto" + File.separator + entityName + "%s" + ".java"), key);
|
||||
}
|
||||
if ("Excel".equals(key)) {
|
||||
fileName = String.format((path+ File.separator +"src/main/java/com/cnbm/generator"+ File.separator + "excel" + File.separator + entityName + "%s" + ".java"), key);
|
||||
fileName = String.format((path+ File.separator +"src/main/java/com/cnbm/generator/code"+ File.separator + "excel" + File.separator + entityName + "%s" + ".java"), key);
|
||||
}
|
||||
this.outputFile(new File(fileName), objectMap, value);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user