Giter Club home page Giter Club logo

better-mybatis-generator's Introduction

better-mybatis-generator idea plugin

插件功能:在idea的database工具中使用,选择表(一或n,建议n小于10),生成mybatis相关的代码,(包括:dao、example、domain、xml)。
Use in idea database tool,right click table(one or more) to generate mybatis files (include:dao、example、domain、xml).

Plugin Installation:

  • 在idea插件系统里安装 | Using IDE built-in plugin system on Windows:
    • File > Settings > Plugins > Browse repositories... > Search for "better-mybatis-generator" > Install Plugin
  • 手动zip安装 | Manually:
    • Download the latest release and install it manually using Preferences > Plugins > Install plugin from disk...

Using sample screenshots:

#1、设置自定义默认配置,若不设置,则使用程序默认配置。 | Set custom default configuration,If not, use the program default configuration.
image

#2、配置数据库 | Connecting to Your Database.
image
image
image

#3、在需要生成代码的表上右键,选择mybatis generate,打开预览界面。 | Select one or more tables,right click and select mybatis generate to open generatoe main UI.
image

#4、设置确认完成后,点击ok,开始生产代码。 | Check configuration in main ui,click ok.
image

#5、首次使用此插件,需要为插件提供数据库账号密码。 | Provide account and password for the first time.
image

#6、检查生成的代码文件 | Generate work finish,Check your files.
image

如何在本地运行/调试此插件 | How to run/debug plugin :

#1、创建工程 File -> New -> Project from Version Control -> Git 填写github地址:https://github.com/kmaster/better-mybatis-generator.git
image
#2、修改sdk image
#3、运行配置无误则直接run/debug。若因idea版本导致提供的配置不对,请考虑本地创建空的插件工程然后参考其配置。
image
此时打上断点就可以一步步调试,修改代码后点击 Build->prepare plugin modle "xxx" For Deployment生成插件安装包再本地安装使用, 如果想优化此插件代码,比如其他数据库或运行环境,可以修改后在github上发起pull request。能点个star就更好了,哈哈。

注意事项 | notice:

#1、当数据库用mysql8,在URL上定义时区,推荐使用'?serverTimezone=GMT',配置中勾选上mysql8选项。 | If your database is mysql8,please add '?serverTimezone=GMT' and select mysql8 option
image
image

better-mybatis-generator's People

Contributors

kmaster 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.