Mybatis Generator使用

2016/07/28 13:49
阅读数 1.8K

资源地址:
MyBatis项目地址:http://mybatis.github.io/
MyBatis中文使用文档:http://mybatis.github.io/mybatis-3/zh/index.html
MyBatis Generator使用文档:http://mybatis.github.io/generator/index.html
MyBatis Generator的Eclipse插件地址:http://mybatis.googlecode.com/svn/sub-projects/generator/trunk/eclipse/UpdateSite/

1.在Eclipse中安装MyBatis Generator插件
Help->Install New Software输入插件地址:http://mybatis.googlecode.com/svn/sub-projects/generator/trunk/eclipse/UpdateSite/,如下图所示,一路Next安装即可

MyBatis <wbr>Generator自动生成MyBatis的映射代码
 

2.创建MyBatis Generator配置文档
File->New->Other...
如图所示新建MyBatis Generator配置文档,按提示创建好即可

MyBatis <wbr>Generator自动生成MyBatis的映射代码
 

3.修改配置值
网址:http://mybatis.github.io/generator/configreference/xmlconfig.html有示例配置及详细的标签介绍,如图所示:

MyBatis <wbr>Generator自动生成MyBatis的映射代码
 

4.运行及结果展示
在该文件右键执行即可,如图所示:

MyBatis <wbr>Generator自动生成MyBatis的映射代码

展开阅读全文
加载中
点击加入讨论🔥(2) 发布并加入讨论🔥
打赏
2 评论
8 收藏
0
分享
返回顶部
顶部