论坛首页 Java企业应用论坛

Mybatis Tool

浏览 11478 次
锁定老帖子 主题:Mybatis Tool
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2014-04-15  

 

Mybatis的官网中提供了一些工具如图:

 

 

MyBatis Generator

MyBatis Generator(MGB)是一个代码生成器。MBG旨在使数据库上很大比例的操作是简单的CRUD产生重大影响,可以很大的提高开发效率。但是您仍然需要手动编写对象的连接查询SQL或存储过程。使用MGB可以自动生成:

  • 匹配表结构的Java POJO对象
  • Mybatis的SQL映射文件,一张表对应一个配置
  • Java的客户端类,客户端类的生成是可选的

MGB的设计是为了在迭代开发环境中运行良好,也可以作为一个Ant任务和Maven插件运行,具体的使用可以参看官方文档:http://mybatis.github.io/generator/

 

MyBatis Migrations

为了达到良好的数据库变更管理实践,Mybatis的团队吸收了Rails和dbdeploy的优点开发出了MyBatis Migrations,力求成为同类产品中最佳的迁移工具。不断变化的数据库一直是软件开发的主要挑战之一,如果想数据库的版本变更可以被很好的管理,MyBatis Migrations是一个命令行的数据库版本管理工具。目标是:

  • Work with any database, new or existing
  • Leverage the source control system (e.g. Subversion)
  • Enable concurrent developers or teams to work independently
  • Allow conflicts very visible and easily manageable
  • Allow for forward and backward migration (evolve, devolve respectively)
  • Make the current status of the database easily accessible and comprehensible
  • Enable migrations despite access privileges or bureaucracy
  • Work with any methodology
  • Encourages good, consistent practices

如果决定使用MyBatis Migrations来管理数据库版本管理,可以参考官方文档:http://mybatis.github.io/migrations/

 

 大家会使用以上两个工具吗?微笑

  • 大小: 5 KB
   发表时间:2014-04-16  
考虑扩展下generator,支持级联查询就好啦
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics