Coder Social home page Coder Social logo

light2001 / mybatis-generator-gui-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spawpaw/mybatis-generator-gui-extension

0.0 1.0 0.0 9.29 MB

图形化MBG,内置丰富插件,可生成Service、Controller、View,配置简单。 A powerful GUI tool for MyBatisGenerator(MBG)

License: Other

Java 92.74% CSS 7.26%

mybatis-generator-gui-extension's Introduction

mybatis-generator-gui-extension

Crates.io Build Status Github Releases

GitHub forks GitHub stars

简介

mybatis-generator-gui-extension是一个为MybatisGenerator编写的图形化界面,为实体/Example/Mapper提供了丰富的扩展。

示例图片

功能清单

  • 文件合并:在重新生成代码时,将保留没有添加@mbg.generated注释的字段/方法/SQL语句
    • 可合并的文件:实体类ExampleMapper.javaMapper.xml
  • 自动包裹关键字:对于表名/字段名为关键字的情况,可指定用 ` 或其他字符串包裹,防止冲突
  • 实体类增强
    • rootClass(可选):可为实体对象指定RootClass
    • trim(可选):为String类型的setter添加trim
    • 使用真实列名(可选):可指定是否使用真实列名
    • 流式构建(可选):直接使用User user= new User().withUsername("uname").withPassword("123");创建对象
    • toString(可选):生成toString方法(可选择是否调用父类的toString方法)
    • equals/hashCode (可选):生成equals/hashCode 方法(可选择是否调用父类的equals/hashCode 方法)
    • Serializable(可选):继承Serializable接口
  • Example增强
    • CaseInsensitiveLike:添加CaseInsensitiveLike查询方式
    • ExampleCriteria增强插件
    • 真实字段获取插件
    • 分页插件:提供基于limit/offset的分页。
  • Mapper增强
    • 指定Mapper类型:可选择纯xml/java和xml混合/纯java的方式生成mapper
    • 指定主键:可指定表的主键,将会自动为该表生成获取自增主键的SQL
    • 虚拟主键
    • 逻辑删除
    • 批量插入
    • 添加@Mapper注解
    • 各个方法的开关
  • 生成JPA注解
  • 指定类头注释:自定义生成的文件的注释
  • 缓存:采用MBG官方的缓存插件,为生成的查询方法提供cache标签
  • 指定BasPackage
  • 对象重命名
    • Example 类的重命名
    • 实体 类的重命名
    • Mapper 类的重命名
  • 指定后缀: 可修改如下项目的后缀:dao包实体包MapperExample实体

如何使用

运行前请确保您的JDK版本为1.8u40以上
推荐使用git克隆仓库到本地,这样当本项目更新时直接pull即可

方法一:下载源代码

  1. 点击右上角Clone or download,或用git命令拷贝代码仓库:git clone https://github.com/spawpaw/mybatis-generator-gui-extension.git

  2. 用IDE将源代码导入为Maven项目,然后直接运行com.spawpaw.mybatis.generator.gui.GeneratorGuiRunner即可

方法二:下载jar包

可以执行mvn: package 自助构建
或者选择版本进行下载

二次开发 && 贡献 && 交流 (进入帮助页面)

如果您在使用过程中遇到了BUG,或者想让软件添加某些功能,请挂issue或者联系作者:[email protected]

项目地址 https://github.com/spawpaw/mybatis-generator-gui-extension
QQ交流群:171209016

其他

如果您觉得本软件对您有帮助,请别忘记给这个项目一个star   ο(=•ω<=)ρ⌒★

捐赠捐助者列表

mybatis-generator-gui-extension's People

Contributors

spawpaw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.