From 4d57d1ed9c980452c1627b99b7a0d60f93126acf Mon Sep 17 00:00:00 2001 From: wangbing <1919101440@qq.com> Date: Fri, 13 Dec 2019 21:27:13 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: e22059b398c650c6d0d98df32cee7668ef312e17 --- .../dbtool/javafx/manger/callable/SpringBootCallable.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java b/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java index 618e115a..90f45c6c 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java @@ -53,6 +53,10 @@ public class SpringBootCallable implements Callable { } // 生成单元测试java目录 File testJavaDir = Tool.createPath(projectDir.getAbsolutePath(), "src", "test", "java"); + File testDomainDir = testJavaDir; + for (String s : project.getProjectBasePackage().split("\\.")) { + testDomainDir = Tool.createPath(testDomainDir.getAbsolutePath(), s); + } // 生成单元测试resources目录 File testResourcesDir = Tool.createPath(projectDir.getAbsolutePath(), "src", "test", "resources"); @@ -121,7 +125,7 @@ public class SpringBootCallable implements Callable { {//生成Test System.out.println("生成模块:Test"); - generateTest(testJavaDir, project, dataBase, option); + generateTest(testDomainDir, project, dataBase, option); } {//生成Test Resources