代码生成文件名带空格问题

dep_wangsr
Rex 5 years ago committed by Limy
parent 4914ee6f17
commit 2ceb39c83b

@ -128,27 +128,27 @@ public class VelocityUtils
if (template.contains("domain.java.vm")) if (template.contains("domain.java.vm"))
{ {
fileName = StringUtils.format("{}/domain/{}.java ", javaPath, className); fileName = StringUtils.format("{}/domain/{}.java", javaPath, className);
} }
else if (template.contains("mapper.java.vm")) else if (template.contains("mapper.java.vm"))
{ {
fileName = StringUtils.format("{}/mapper/{}Mapper.java ", javaPath, className); fileName = StringUtils.format("{}/mapper/{}Mapper.java", javaPath, className);
} }
else if (template.contains("service.java.vm")) else if (template.contains("service.java.vm"))
{ {
fileName = StringUtils.format("{}/service/I{}Service.java ", javaPath, className); fileName = StringUtils.format("{}/service/I{}Service.java", javaPath, className);
} }
else if (template.contains("serviceImpl.java.vm")) else if (template.contains("serviceImpl.java.vm"))
{ {
fileName = StringUtils.format("{}/service/impl/{}ServiceImpl.java ", javaPath, className); fileName = StringUtils.format("{}/service/impl/{}ServiceImpl.java", javaPath, className);
} }
else if (template.contains("controller.java.vm")) else if (template.contains("controller.java.vm"))
{ {
fileName = StringUtils.format("{}/controller/{}Controller.java ", javaPath, className); fileName = StringUtils.format("{}/controller/{}Controller.java", javaPath, className);
} }
else if (template.contains("mapper.xml.vm")) else if (template.contains("mapper.xml.vm"))
{ {
fileName = StringUtils.format("{}/{}Mapper.xml ", mybatisPath, className); fileName = StringUtils.format("{}/{}Mapper.xml", mybatisPath, className);
} }
else if (template.contains("list.html.vm")) else if (template.contains("list.html.vm"))
{ {

Loading…
Cancel
Save