提交代码+1

master
rong.liu 2 years ago
parent c78c2cc9a2
commit 0e6b5dd920
  1. 6
      src/test/java/com/company/project/CodeGenerator.java

@ -41,7 +41,7 @@ public class CodeGenerator {
// 3、数据源配置
DataSourceConfig dsc = new DataSourceConfig();
dsc.setUrl("jdbc:mysql://127.0.0.1:3306/iasf?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8");
dsc.setUrl("jdbc:mysql://192.168.31.136:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8");
dsc.setDriverName("com.mysql.cj.jdbc.Driver");
dsc.setUsername("root");
dsc.setPassword("123456");
@ -61,9 +61,9 @@ public class CodeGenerator {
// 5、策略配置
StrategyConfig strategy = new StrategyConfig();
strategy.setInclude("sys_site");
strategy.setInclude("sys_template_style");
strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略
strategy.setTablePrefix("sys_"); //生成实体时去掉表前缀
// strategy.setTablePrefix("sys_"); //生成实体时去掉表前缀
strategy.setColumnNaming(NamingStrategy.underline_to_camel);//数据库表字段映射到实体的命名策略
strategy.setEntityLombokModel(true); // lombok 模型 @Accessors(chain = true) setter链式操作

Loading…
Cancel
Save