/*    */ package com.picc.generator;
/*    */ 
/*    */ import com.baomidou.mybatisplus.generator.AutoGenerator;
/*    */ import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
/*    */ import com.baomidou.mybatisplus.generator.config.GlobalConfig;
/*    */ import com.baomidou.mybatisplus.generator.config.ITypeConvert;
/*    */ import com.baomidou.mybatisplus.generator.config.PackageConfig;
/*    */ import com.baomidou.mybatisplus.generator.config.StrategyConfig;
/*    */ import com.baomidou.mybatisplus.generator.config.converts.MySqlTypeConvert;
/*    */ import com.baomidou.mybatisplus.generator.config.rules.DbColumnType;
/*    */ import com.baomidou.mybatisplus.generator.config.rules.DbType;
/*    */ import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
/*    */ 
/*    */ public class MyBatisPlusGenerator {
/*    */   public static void main(String[] args) {
/* 21 */     AutoGenerator mpg = new AutoGenerator();
/* 24 */     GlobalConfig gc = new GlobalConfig();
/* 25 */     gc.setOutputDir("D:\\test");
/* 26 */     gc.setFileOverride(true);
/* 27 */     gc.setActiveRecord(true);
/* 28 */     gc.setEnableCache(false);
/* 29 */     gc.setBaseResultMap(true);
/* 30 */     gc.setBaseColumnList(false);
/* 31 */     gc.setAuthor("ZKK");
/* 32 */     mpg.setGlobalConfig(gc);
/* 35 */     DataSourceConfig dsc = new DataSourceConfig();
/* 36 */     dsc.setDbType(DbType.MYSQL);
/* 37 */     dsc.setTypeConvert((ITypeConvert)new MySqlTypeConvert() {
/*    */           public DbColumnType processTypeConvert(String fieldType) {
/* 41 */             return super.processTypeConvert(fieldType);
/*    */           }
/*    */         });
/* 44 */     dsc.setDriverName("com.mysql.jdbc.Driver");
/* 45 */     dsc.setUsername("md_nj");
/* 46 */     dsc.setPassword("1Zy8fOxA");
/* 47 */     dsc.setUrl("jdbc:mysql://rm-2ze5n7na504yifpm05o.mysql.rds.aliyuncs.com/nj_mdb?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf8&autoReconnect=true&serverTimezone=GMT%2B8&useSSL=true");
/* 48 */     mpg.setDataSource(dsc);
/* 51 */     StrategyConfig strategy = new StrategyConfig();
/* 52 */     strategy.setTablePrefix(new String[] { "md_" });
/* 53 */     strategy.setNaming(NamingStrategy.underline_to_camel);
/* 54 */     strategy.setInclude(new String[] { "md_piccGrabParam" });
/* 55 */     mpg.setStrategy(strategy);
/* 58 */     PackageConfig pc = new PackageConfig();
/* 59 */     pc.setParent("com.picc.grab");
/* 61 */     pc.setEntity("domain");
/* 62 */     pc.setMapper("mapper");
/* 63 */     pc.setXml("mapper.xml");
/* 64 */     pc.setService("service");
/* 65 */     pc.setServiceImpl("service.impl");
/* 66 */     pc.setController("controller");
/* 67 */     mpg.setPackageInfo(pc);
/* 81 */     mpg.execute();
/* 84 */     System.err.println(mpg.getCfg().getMap().get("abc"));
/*    */   }
/*    */ }


/* Location:              C:\Users\Administrator\Desktop\ROOT\WEB-INF\classes\!\com\picc\generator\MyBatisPlusGenerator.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */