|
@@ -28,12 +28,13 @@ public class CodeGeneration {
|
|
// 全局配置
|
|
// 全局配置
|
|
GlobalConfig gc = new GlobalConfig();
|
|
GlobalConfig gc = new GlobalConfig();
|
|
gc.setOutputDir("E://code//cdss");
|
|
gc.setOutputDir("E://code//cdss");
|
|
|
|
+ // gc.setOutputDir(System.getProperty("user.dir") + "//src//main//java");
|
|
gc.setFileOverride(true);
|
|
gc.setFileOverride(true);
|
|
gc.setActiveRecord(false);// 不需要ActiveRecord特性的请改为false
|
|
gc.setActiveRecord(false);// 不需要ActiveRecord特性的请改为false
|
|
gc.setEnableCache(false);// XML 二级缓存
|
|
gc.setEnableCache(false);// XML 二级缓存
|
|
gc.setBaseResultMap(true);// XML ResultMap
|
|
gc.setBaseResultMap(true);// XML ResultMap
|
|
gc.setBaseColumnList(false);// XML columList
|
|
gc.setBaseColumnList(false);// XML columList
|
|
- gc.setAuthor("gaodm");// 作者
|
|
|
|
|
|
+ gc.setAuthor("zhoutg");// 作者
|
|
|
|
|
|
// 自定义文件命名,注意 %s 会自动填充表实体属性!
|
|
// 自定义文件命名,注意 %s 会自动填充表实体属性!
|
|
gc.setControllerName("%sController");
|
|
gc.setControllerName("%sController");
|
|
@@ -54,9 +55,9 @@ public class CodeGeneration {
|
|
|
|
|
|
// 策略配置
|
|
// 策略配置
|
|
StrategyConfig strategy = new StrategyConfig();
|
|
StrategyConfig strategy = new StrategyConfig();
|
|
- strategy.setTablePrefix(new String[] { "demo_" });// 此处可以修改为您的表前缀
|
|
|
|
|
|
+ // strategy.setTablePrefix(new String[] { "demo_" });// 此处可以修改为您的表前缀
|
|
strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
|
|
strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
|
|
- strategy.setInclude(new String[] { "demo_mrtest_info"}); // 需要生成的表
|
|
|
|
|
|
+ strategy.setInclude(new String[] { "tran_hospital_relation"}); // 需要生成的表
|
|
|
|
|
|
strategy.setSuperServiceClass(null);
|
|
strategy.setSuperServiceClass(null);
|
|
strategy.setSuperServiceImplClass(null);
|
|
strategy.setSuperServiceImplClass(null);
|