From e5babd4e85ff02fd7bf652bbf82d16b43ac70165 Mon Sep 17 00:00:00 2001 From: fengjun Date: Tue, 2 Jul 2024 06:23:15 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=9F=E6=88=90=E5=99=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=B7=AF=E5=BE=84=20(#2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: fengjun <879818327@qq.com> Reviewed-on: http://192.168.1.184:3000/fengjun/AG-ONE/pulls/2 --- .../src/main/resources/mapper/i.ini | 0 .../main/java/org/generator/GeneratorMain.java | 16 ++++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 IlogDynamicModule/src/main/resources/mapper/i.ini diff --git a/IlogDynamicModule/src/main/resources/mapper/i.ini b/IlogDynamicModule/src/main/resources/mapper/i.ini new file mode 100644 index 0000000..e69de29 diff --git a/mybatis-generator/src/main/java/org/generator/GeneratorMain.java b/mybatis-generator/src/main/java/org/generator/GeneratorMain.java index 5793420..30195dc 100644 --- a/mybatis-generator/src/main/java/org/generator/GeneratorMain.java +++ b/mybatis-generator/src/main/java/org/generator/GeneratorMain.java @@ -18,15 +18,20 @@ public class GeneratorMain { private static final JdbcParams jdbc = new JdbcParams(); static { jdbc.setDriveClass("com.mysql.cj.jdbc.Driver"); - jdbc.setUrl("jdbc:mysql://122.5.19.222:3909/ag_devmysql"); + jdbc.setUrl("jdbc:mysql://192.168.1.188:3306/ag_one_test"); jdbc.setUsername("root"); jdbc.setPassword("agmysqlroot"); } + public static String getProjectPath() { + return System.getProperty("user.dir"); + } + + //不考虑用户 static class Generator{ public static void main(String[] args) throws XMLParserException, SQLException, IOException, InterruptedException, InvalidConfigurationException { - String tableNames = "teacher"; + String tableNames = "student"; String[] tableNameArray = tableNames.split(","); for (String tableName : tableNameArray) { GeneratorStarter.generate(tableName,jdbc); @@ -36,8 +41,8 @@ public class GeneratorMain { //考虑用户 ,同一个用户 static class GeneratorMultiple{ public static void main(String[] args) throws XMLParserException, SQLException, IOException, InterruptedException, InvalidConfigurationException { - String tableNames = "FA_VBILL_TRUCK,FA_VBILL_CUSTOM"; - String tableSchema = "AG_SECP_SHHH"; + String tableNames = "student"; + String tableSchema = ""; String[] tableNameArray = tableNames.split(","); for (String tableName : tableNameArray) { GeneratorStarter.generate(tableName,tableSchema,jdbc); @@ -55,9 +60,8 @@ public class GeneratorMain { // } // } - //基础路径 - public static final String BASE_PATH = "E:\\IdeaProject\\AG_MYSQL_PLATFORM3.0\\IlogDynamicModule\\src\\main\\"; + public static final String BASE_PATH = getProjectPath()+"\\IlogDynamicModule\\src\\main\\"; //domain包路径 public static final String DOMAIN_PACKAGE = "com.ag.example.domain"; //pojo包路径