package com.how2java;

import java.io.File;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List; import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.internal.DefaultShellCallback; public class TestMybatisGenerator { public static void main(String[] args) throws Exception {
List<String> warnings = new ArrayList<String>();
boolean overwrite = true;
InputStream is= TestMybatisGenerator.class.getClassLoader().getResource("generatorConfig.xml").openStream();
ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config = cp.parseConfiguration(is);
is.close();
DefaultShellCallback callback = new DefaultShellCallback(overwrite);
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
myBatisGenerator.generate(null);
System.out.println("成功啦哈哈哈"); }
}

最新文章

  1. InnoDB:Lock &amp; Transaction
  2. bzoj 4326: NOIP2015 运输计划
  3. Quartz.NET开源作业调度框架系列(四):Plugin Job
  4. 说说React
  5. barabasilab-networkScience学习笔记5- Barab&#225;si-Albert 模型
  6. 0518 Scrum项目5.0
  7. 在XE5中 VCL空窗体的3个线程
  8. ExecutorService - 10个技巧和窍门
  9. Unigui有用的网址
  10. postgresql info
  11. iOS 错误 之 http请求
  12. prop解决一个checkbox选中后再次选中失效的问题
  13. 基于LVDS/M-LVDS的数据通信
  14. 扩展Lucas定理
  15. group by搭配 order by解决排序问题
  16. cJSON库的简单介绍及使用
  17. Solr的Filed中indexed与stored属性
  18. Block 语法
  19. Java常用排序算法及性能测试集合
  20. RESTful api架构设计

热门文章

  1. 新司机的致胜法宝,使用ApexSql Log2018快速恢复数据库被删除的数据
  2. klassVtable与klassItable
  3. DB2 创建存储过程保存:XX 后面找到异常标记 &quot;END-OF-STATEMENT&quot;。
  4. Oracle 存储过程 批量插入测试数据
  5. C#LeetCode刷题之#896-单调数列(Monotonic Array)
  6. 面试官:怎么做JDK8的垃圾收集器的调优?
  7. Typora markdown代码块显示序号
  8. 求正整数2和n之间的完全数
  9. 用WEB方式开发WPF桌面程序
  10. 修改linux 动态ip为静态ip