mybatis-generator-core-1.3.3下载地址:http://blog.mybatis.org/p/products.html

下载后名解压,进入lib目录

修改一个GeneratorConfig.xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd"> <generatorConfiguration>
<classPathEntry
location="E:/JavaProject/AMAP/XuMavenRepository/mysql/mysql-connector-java/5.1.20/mysql-connector-java-5.1.20.jar"/>
<context id="my" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressDate" value="false"/>
<property name="suppressAllComments" value="true"/>
</commentGenerator>
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://127.0.0.1:3306/traffic_authen_db?characterEncoding=utf8" userId="root"
password=""/> <javaModelGenerator targetPackage="com.autonavi.tinfo.traffic.authentication.entity"
targetProject="E:\JavaProject\AMAP\traffic-authentication\authentication-service\trunk\src\main\java">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator> <sqlMapGenerator targetPackage="mapper"
targetProject="E:\JavaProject\AMAP\traffic-authentication\authentication-service\trunk\src\main\resources\etc\ctx">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator> <javaClientGenerator targetPackage="com.autonavi.tinfo.traffic.authentication.mapper"
targetProject="E:\JavaProject\AMAP\traffic-authentication\authentication-service\trunk\src\main\java" type="XMLMAPPER">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator> <table tableName="rt_provider" domainObjectName="Provider"
enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false">
</table> <table tableName="qualitytable" domainObjectName="Qualitytable"
enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false">
</table> <table tableName="tb_city_all" domainObjectName="CityAll"
enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false">
</table> <table tableName="tb_city_json" domainObjectName="CityJson"
enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false">
</table> <table tableName="t4a9438a4d7e706980785b75d2fe9e28d" domainObjectName="TbGuid"
enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false">
</table> </context>
</generatorConfiguration>

shift+鼠标右键,打开cmd命令行窗口:

C:\Users\xxl\Desktop\mybatis-generator-core-1.3.3\lib>java -jar m
ybatis-generator-core-1.3.3.jar -configfile E:\JavaProject\CreateCode\src\main\r
esources\GeneratorConfig.xml  -overwrite

MyBatis Generator finished successfully.执行成功

mybatis-generator-core生成代码的更多相关文章

  1. SpringBoot 添加mybatis generator 自动生成代码插件

    自动生成数据层代码,提高开发效率 1.pom添加插件,并指定配置文件路径 <!-- mybatis generator 自动生成代码插件 --> <plugin> <gr ...

  2. idea中mybatis generator自动生成代码配置 数据库是sqlserver

    好长时间没有写博客了,最近公司要用java语言,开始学习java,属于初学者,今天主要记录一下mybatis generator自动生成代码,首先在如下图的目录中新建两个文件,如下图 generato ...

  3. SpringBoot入门篇--整合mybatis+generator自动生成代码+druid连接池+PageHelper分页插件

    原文链接 我们这一篇博客讲的是如何整合Springboot和Mybatis框架,然后使用generator自动生成mapper,pojo等文件.然后再使用阿里巴巴提供的开源连接池druid,这个连接池 ...

  4. IDEA Maven Mybatis generator 自动生成代码

    IDEA Maven Mybatis generator 自动生成代码 一.安装配置maven以及在Idea中配置maven 安装过程步骤可以看上面的博文,里面介绍得很详细. 二.建数据表 DROP ...

  5. Mybatis generator 逆向生成代码

    Mybatis generator 逆向生成代码 简单介绍 本文介绍用mybatis逆向生成javaben dao接口 1.创建maven项目 创建相应的包 附上项目创建完成的图片 然后在pom.xm ...

  6. IDEA Maven Mybatis generator 自动生成代码(实例讲解)(转)

    IDEA Maven Mybatis generator 自动生成代码(实例讲解) MyBatis Generator • 简称MBG,是一个专门为MyBatis框架使用者定制的代码生成器,可以快速的 ...

  7. IDEA使用mybatis generator自动生成代码

    主要就三步: 1.pom 文件中引入jar包并配置 build 属性 <dependencies> <!-- 自动生产mapper Begin! --> <depende ...

  8. mybatis generator自动生成代码时 只生成了insert 而没有其他的

    mybatis框架提供了非常好用的逆向工程插件,但是在使用过程中会有很多问题. 我在使用中就遇到了只生成insert和insertSeletive方法,而不生成其他根据primary key查询更新删 ...

  9. 在IDEA中使用MyBatis Generator自动生成代码

    转载自 https://blog.csdn.net/hua_faded/article/details/78900780 一.配置Maven pom.xml 文件 在pom.xml增加以下插件:   ...

  10. 在IDEA中使用MyBatis Generator逆向工程生成代码

    本文介绍一下用Maven工具如何生成Mybatis的代码及映射的文件. 一.配置Maven pom.xml 文件 在pom.xml增加以下插件: <build> <finalName ...

随机推荐

  1. PHP中的null合并运算符

    project: blog target: null-coalesce-operator-in-php.md date: 2015-12-30 status: publish tags: - Null ...

  2. How to implement updatable view with NHibernate

    see : http://msdn.microsoft.com/en-us/library/ms187956.aspx(The constrains of creation updatable vie ...

  3. SPOJ BALNUM

    一开始题看错了...dp[pos][sets][viss],其中sets表示出现次数,viss表示出现没有. #include<iostream> #include<cstdio&g ...

  4. web.xml在Servlet3.0中的新增元素

    metadata-complete: 当属性为true时,该Web应用将不会加载注解配置的Web组件(如Servlet.Filter.Listener) 当属性为false时,将加载注解配置的Web组 ...

  5. Maven项目的核心pom.xml解释(转)

    文章转自http://blog.sina.com.cn/s/blog_534f69a001010lpv.html maven项目的核心是pom.xml.POM(Project Object Model ...

  6. Bubble Sort_树状数组

    Problem Description P is a permutation of the integers from 1 to N(index starting from 1).Here is th ...

  7. C++ 调用 java jni.h 的使用

    JNI c++ 调用 java ----------------------------------------------c++----------------------------------- ...

  8. java中Timer的使用

    // 第一种方法:设定指定任务task在指定时间time执行后执行TimerTask方法(执行一次) public static void timer1(){ Timer timer = new Ti ...

  9. YUSE_DOWN-批下载

    *&---------------------------------------------------------------------**& Report YTST_CX_DO ...

  10. mySql-通过group by分组

    当我们想查询主表和子表的信息时,我们首先会通过主表的id和子表中的主表id关联 如现有主表:tbl_enquire_price(询价表)和子表:tbl_enquire_price_detail(询价详 ...