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