MyBatis Generator自动生成MyBatis的映射代码
2015-11-24 10:17
337 查看
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.运行及结果展示
在该文件右键执行即可,如图所示:
资源地址:
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.运行及结果展示
在该文件右键执行即可,如图所示:
相关文章推荐
- Ubuntu安装切换jdk版本
- Java类中重写toString方法
- eclipse上hadoop插件的安装和配置
- myeclipse10在打开已有的工程出现的问题
- C++进行CGI的WEB编程
- Java并发的四种风味:Thread、Executor、ForkJoin和Actor
- C# 常用函数
- win编程实践(4)【c++】- 多维数组指针
- java代理机制
- 使用Spring Boot快速构建应用
- 用 Python 和 OpenCV 检测图片上的条形码
- JavaWeb三大组件之Filter
- Matlab里面.M文件不能运行,预期的图像也显示不出来的一个原因
- java 生成二维码
- java 字符串转时间,支持多种格式
- cascadeclassifier.cpp
- 脚本Remove Google Results Redirect在更改本机host导致无效的解决办法
- 各种排序算法的分析及java实现
- 28.c/c++程序员面试宝典-继承时的类作用域
- PHP 正则表达式截取HTML