| | |
| | | // 演示例子,执行 main 方法控制台输入模块表名回车自动生成对应项目目录中 |
| | | public class CodeGenerator { |
| | | |
| | | public static String database_url = "jdbc:mysql://localhost:3306/lims_manage?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai"; |
| | | public static String database_url = "jdbc:mysql://localhost:3306/lims_laboratory?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai"; |
| | | public static String database_driver_name = "com.mysql.cj.jdbc.Driver"; |
| | | public static String database_username = "root"; |
| | | public static String database_password= "123456"; |
| | | public static String author = "江苏鵷雏网络科技有限公司"; |
| | | public static String model_name = "/user-server"; // 如果为分布式填子模块名称,如果不是分布式为空即可 |
| | | public static String setParent = "com.yunchu.limslaboratory"; // 包路径 |
| | | public static Boolean Override = true; // 是否覆盖原来的文件? |
| | | public static String model_name = "/inspection-server"; // 如果为分布式填子模块名称,如果不是分布式为空即可 |
| | | public static String setParent = "com.yuanchu.limslaboratory"; // 包路径 |
| | | public static Boolean Override = false; // 是否覆盖原来的文件? |
| | | |
| | | public static void main(String[] args) { |
| | | // 代码生成器 |
| | |
| | | .setColumnNaming(NamingStrategy.underline_to_camel) |
| | | .setEntityLombokModel(true) |
| | | .setRestControllerStyle(true) |
| | | .setInclude(scanner("表名,多个空格分割").split(" ")) |
| | | .setInclude(scanner("表名,多个道号分割").split(",")) |
| | | .setControllerMappingHyphenStyle(true) |
| | | .setTablePrefix("m_"); |
| | | mpg.setStrategy(strategy); |