eclipse mybatis-generator 插件安装及使用

1、

 2、 点击Add...

Name自定义

在Location中输入https://dl.bintray.com/mybatis/mybatis-generator/

 3、勾选之后,点击next。一步一步点下去就可以了。

 4、选中工程一个目录(新建生成文件的位置)。点击右键->New->Other...



 5、

6、

7、生成的文件内容如下:



 
 8、我的配置如下:

<generatorConfiguration>
    <classPathEntry
        location="D:/Program Files (x86)/repository/mysql/mysql-connector-java/5.1.30/mysql-connector-java-5.1.30.jar" />
    <context id="context1">
        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
            connectionURL="jdbc:mysql://localhost:3306/jeesite?useUnicode=true"
            userId="root" password="123456" />
        <javaModelGenerator targetPackage="com.thinkgem.jeesite.test.own.testgen.entity"
            targetProject="jeesite\src\main\java" />
        <sqlMapGenerator targetPackage="mappings.test"
            targetProject="jeesite\src\main\resources" />
        <javaClientGenerator targetPackage="com.thinkgem.jeesite.test.own.testgen.mapper"
            targetProject="jeesite\src\main\java" type="XMLMAPPER" />
        <table tableName="table_1"
            enableCountByExample="false" enableUpdateByExample="false"
            enableDeleteByExample="false" enableSelectByExample="false"
            selectByExampleQueryId="false"/>

    </context>
</generatorConfiguration>

9、配置完之后,右键配置文件。选中Generate MyBatis/iBATIS Artifacts



 
 10、在对应的文件目录即可生成相应的文件



 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值