Mybatis Plugin for IntelliJ IDEA文档

We can do navigation by clicking the gutter icons or using idea shortcuts.

The shortcuts navigating from Java interface to statements is the same as the shorcuts of going to implementations. The default shortcuts are Command + Option + B for Mac and Ctrl + Alt + B for Windows.

navigation

Generating

Plugin supports creating mapper xml and statements quicker.

We can use the intention key to generate mapper xml quickly, the plugin will find a proper folder to place the file automatically according to the location of existing mapper files. We can also choose a new folder to place the generated file.

The default intention shortcuts are Option + ↩ for Mac and Alt + ↩ for Windows.

Completion

It’s now much easier and more convenient to edit the config file of mybatis generator as hints are given almost everywhere.

The plugin will also find database driver path automatically according to classpath.

ConfigFile

File templates are useful features for creating files. There are two file templates for mybatis built by the plugin, they are mybatis config file and mybatis generator config file.

These files support auto completion as well, so you can edit them easily.

Follow these steps to create files from templates, Right click on the folder you want to create the file -> New Menu -> Choose the file template -> Enter the file name you want.

如果您觉得这篇文章不错,可以打赏支持下哦,谢谢