Use in idea database tool,right click table(one or more) to generate mybatis files (include:dao、example、domain、xml)
- Using IDE built-in plugin system on Windows:
- File > Settings > Plugins > Browse repositories... > Search for "better-mybatis-generator" > Install Plugin
- Manually:
- Download the latest release and install it manually using Preferences > Plugins > Install plugin from disk...
#1、Set custom default configuration,If not, use the program default configuration. | 设置自定义默认配置,若不设置,则使用程序默认配置。
#2、Connecting to Your Database | 配置数据库
#3、Select one or more tables,right click and select mybatis generate to open generatoe main UI. | 在需要生成代码的表上右键,选择mybatis generate,打开预览界面。
#4、Check configuration in main ui,click ok | 设置确认完成后,点击ok,开始生产代码。
#5、Provide account and password for the first time. | 首次使用此插件,需要为插件提供数据库账号密码。