diff --git a/zheng-common/src/main/java/com/zheng/common/util/MybatisGeneratorUtil.java b/zheng-common/src/main/java/com/zheng/common/util/MybatisGeneratorUtil.java index 8b88a8d6c..9e3d1c59b 100644 --- a/zheng-common/src/main/java/com/zheng/common/util/MybatisGeneratorUtil.java +++ b/zheng-common/src/main/java/com/zheng/common/util/MybatisGeneratorUtil.java @@ -51,6 +51,7 @@ public static void generator( Map lastInsertIdTables) throws Exception{ String os = System.getProperty("os.name"); + String targetProject = module + "/" + module + "-dao"; String basePath = MybatisGeneratorUtil.class.getResource("/").getPath().replace("/target/classes/", "").replace(targetProject, ""); if (os.toLowerCase().startsWith("win")) { generatorConfig_vm = MybatisGeneratorUtil.class.getResource(generatorConfig_vm).getPath().replaceFirst("/", ""); @@ -65,7 +66,6 @@ public static void generator( serviceImpl_vm = MybatisGeneratorUtil.class.getResource(serviceImpl_vm).getPath(); } - String targetProject = module + "/" + module + "-dao"; String generatorConfigXml = MybatisGeneratorUtil.class.getResource("/").getPath().replace("/target/classes/", "") + "/src/main/resources/generatorConfig.xml"; targetProject = basePath + targetProject; String sql = "SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '" + database + "' AND table_name LIKE '" + tablePrefix + "_%';";