|
@@ -24,7 +24,7 @@ public class Generator {
|
|
|
//
|
|
|
//generatorToFile(db_url, db_username, db_password, fileOutputDir, fileName);
|
|
|
generatorToFile("jdbc:mysql://mysql.aimpdev.svc.k5.bigtree.zone:3306/aimp_model", "test_user", "tmOxmmc+3jznq2cX",
|
|
|
- "doc", "db");
|
|
|
+ "doc", "db","");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -35,7 +35,7 @@ public class Generator {
|
|
|
* @param db_password 数据库密码
|
|
|
*/
|
|
|
public static void generatorToFile(String db_url, String db_username, String db_password,
|
|
|
- String fileOutputDir, String fileName) {
|
|
|
+ String fileOutputDir, String fileName,String ignoreTableNames) {
|
|
|
|
|
|
//数据源
|
|
|
HikariConfig hikariConfig = new HikariConfig();
|
|
@@ -62,6 +62,9 @@ public class Generator {
|
|
|
.fileName(fileName).build();
|
|
|
//忽略表
|
|
|
ArrayList<String> ignoreTableName = new ArrayList<>();
|
|
|
+ for (String s : ignoreTableNames.split(",")) {
|
|
|
+ ignoreTableName.add(s);
|
|
|
+ }
|
|
|
//ignoreTableName.add("test_user");
|
|
|
//ignoreTableName.add("test_group");
|
|
|
//忽略表前缀
|