| | |
| | | // 演示例子,执行 main 方法控制台输入模块表名回车自动生成对应项目目录中 |
| | | public class CodeGenerator { |
| | | |
| | | public static String database_url = "jdbc:mysql://127.0.0.1:3306/product-inventory-management"; |
| | | public static String database_url = "jdbc:mysql://127.0.0.1:3306/product-inventory-management-new"; |
| | | public static String database_username = "root"; |
| | | public static String database_password= "123456"; |
| | | public static String author = "芯导软件(江苏)有限公司"; |
| | | public static String model = "collaborativeApproval"; // 模块 |
| | | public static String model = "account"; // 模块 |
| | | public static String setParent = "com.ruoyi."+ model; // 包路径 |
| | | public static String tablePrefix = ""; // 设置过滤表前缀 |
| | | public static void main(String[] args) { |
| | |
| | | .packageConfig(builder -> { |
| | | builder.entity("pojo"); |
| | | builder.parent(setParent) // 设置父包名 |
| | | .pathInfo(Collections.singletonMap(OutputFile.xml, projectPath + "/src/main/resources/"+model+"/mapper")); // 设置mapperXml生成路径 |
| | | .pathInfo(Collections.singletonMap(OutputFile.xml, projectPath + "/src/main/resources/mapper/"+model)); // 设置mapperXml生成路径 |
| | | }) |
| | | // 策略配置 |
| | | .strategyConfig(builder -> { |