|
@@ -194,8 +194,8 @@ public class CodeGenerator {
|
|
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
|
|
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
|
|
//若想要生成的实体类继承某个类,则可打开下面注释。写上需要继承的类的位置即可
|
|
//若想要生成的实体类继承某个类,则可打开下面注释。写上需要继承的类的位置即可
|
|
// strategy.setSuperEntityClass("com.baomidou.ant.common.BaseEntity");
|
|
// strategy.setSuperEntityClass("com.baomidou.ant.common.BaseEntity");
|
|
- //【实体】是否为lombok模型(默认 false)
|
|
|
|
-// strategy.setEntityLombokModel(true);
|
|
|
|
|
|
+// 【实体】是否为lombok模型(默认 false)
|
|
|
|
+ strategy.setEntityLombokModel(true);
|
|
//对控制器生成 @RestController 注解
|
|
//对控制器生成 @RestController 注解
|
|
strategy.setRestControllerStyle(true);
|
|
strategy.setRestControllerStyle(true);
|
|
//是否生成实体时,生成字段注解
|
|
//是否生成实体时,生成字段注解
|
|
@@ -205,8 +205,8 @@ public class CodeGenerator {
|
|
// strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
|
|
// strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
|
|
//此处user是表名,多个英文逗号分割
|
|
//此处user是表名,多个英文逗号分割
|
|
// strategy.setInclude("mould_down_packet");
|
|
// strategy.setInclude("mould_down_packet");
|
|
- strategy.setExclude();//数据库表全生成
|
|
|
|
-// strategy.setInclude(scanner("user").split(","));//表名,多个英文逗号分割
|
|
|
|
|
|
+// strategy.setExclude();//数据库表全生成
|
|
|
|
+ strategy.setInclude("online_application","company_products");//表名,多个英文逗号分割
|
|
strategy.setControllerMappingHyphenStyle(true);
|
|
strategy.setControllerMappingHyphenStyle(true);
|
|
//数据库表前缀,不配置这行的话,生成的类会带有T如:TUser,配置后即可将前缀去掉
|
|
//数据库表前缀,不配置这行的话,生成的类会带有T如:TUser,配置后即可将前缀去掉
|
|
// strategy.setTablePrefix("tb_");
|
|
// strategy.setTablePrefix("tb_");
|