码迷,mamicode.com
首页 > 其他好文 > 详细

MyBatis映射实体类插件 MyBatis Generator

时间:2016-12-22 00:02:32      阅读:298      评论:0      收藏:0      [点我收藏+]

标签:googl   show   映射   16px   资源   sof   run   target   tar   

MyBatis Generator大大简化了MyBatis的数据库的代码编写,有了一个配置文件,就可以直接根据表映射成实体类、Dao类和xml映射。
资源地址:
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安装即可

技术分享

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

技术分享

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

技术分享

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

技术分享

原文地址:http://blog.sina.com.cn/s/blog_6f7265cf0102v7qa.html

 

MyBatis映射实体类插件 MyBatis Generator

标签:googl   show   映射   16px   资源   sof   run   target   tar   

原文地址:http://www.cnblogs.com/laotan/p/6209323.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!