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