支持多层包名的项目

This commit is contained in:
shuzheng 2017-01-10 23:43:36 +08:00
parent 873d9eae7a
commit 2a991721ab
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ public class MybatisGeneratorConfigUtil {
String jdbc_username,
String jdbc_password,
String module_prefix_name) {
String module_path = PROJECT_NAME + "-" + module_prefix_name + "/" + PROJECT_NAME + "-" + module_prefix_name + "-dao/src/main/resources/generatorConfig.xml";
String module_path = PROJECT_NAME + "-" + module_prefix_name + "/" + PROJECT_NAME + "-" + module_prefix_name.replaceAll(".", "-") + "-dao/src/main/resources/generatorConfig.xml";
String sql = "SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '" + DATABASE_NAME + "' AND table_name LIKE '" + module_prefix_name + "_%';";
System.out.println("========== 开始生成代码 ==========");
try {