图形化MBG,内置丰富插件,可生成Service、Controller、View,配置简单。 A powerful GUI tool for MyBatisGenerator(MBG)
javax.persistence.Entity
包的BUG (#22 #23)fix: hide sys table/view for SQLServer.
fix: add delimiter to SQL keywords if they are used as column/table names (#17)
fix: cannot get table remark
feat: add LastInsertIdSqlStatement
option, you can customize the sql statement for getting auto increment columns.
rootClass
选项ExampleEnhancedPlugin
、ModelColumnPlugin
、BatchInsertPlugin
联动(这三个插件之间存在依赖关系,联动后方便使用者配置)@mbg.generated
标记),用户自定义代码将不会被删除。Mysql
和Oracle
进行了测试,如果您在连接数据库时遇到了问题,请联系开发者解决)Annotated Mapper
: 生成的对象为基于注解和MyBatis 3.x SqlProviders的Java接口,不会生成XMLMixed Mapper
: 生成的对象为基于注解和MyBatis 3.x SqlProviders的Java接口。但复杂的动态SQL语句将采用XML形式XML Mapper
: 生成的对象是依赖于XML mapper的Java接口hierarchical
: 层次结构。 如果表有主键,则生成一个主键类。如果表有BLOB列,则生成另一个类来存放这些字段。再生成一个类来存放表的其他字段conditional
: 根据条件自动选择。默认值。hierarchical
相同flat
: 扁平结构。只为表生成一个实体对象。这个对象将包含表中的所有字段java type
、java property
、type handler
、column override
selectByPrimaryKeyQueryId
、selectByExampleQueryId
toString插件
。为实体生成toString方法分页插件
。生成基于limit/offset的分页查询注释插件
:
流式构建插件
: 方便的对实体进行链式调用。例如:User user = new User().withUserName("uName"").withPassword("pwd"");
缓存插件
:为生成的XML添加 虚拟主键插件
:指定某些列作为主键CaseInsensitiveLike插件
:为Example类生成CaseInsensitiveLike方法MapperAnnotationPlugin
:为java接口添加@Mapper注解y_
)