Mybaits Plugin is perfect for mybatis developers.
We make it much easier to navigate between mapper interface and statements in mapper XML.
We can finally do navigation by one click or using shortcuts now.
The plugin will always give you some useful hints almost everywhere. Hints are the usual stuff you need, this is the best way to save your time.
These functions include the parameter type completion, alias completion, return type completion, property completion, sql parameter completion, jdbc type completion, etc.
Creating mapper xml and writing statements manually are something annoying . The plugin give you a easier way to generate these files and statements automatically.
The plugin will always check the codes that do not comply with the mybatis rules and give us accurate advices. We can easily use shortcuts to correct the wrong places.
We build mybatis generator as a part of IntelliJ IDEA.
It's much easier and more convenient to edit the configuration file as hints are given almost everywhere. We can also run the generator just by one click on the configuration file.
Refactoring is a very important feature, which reduces the risks of errors caused by modifying manually. As elements are linked together with each other by plugin, elements can be refactored easily.
For example, we can refactor the id of a statement, then the method name corresponding to the statement will be refactored at the same time automatically.
The plugin will register mapper interfaces as spring beans, then you can use the spring features for the mapper interfaces.
The plugin provides a easier way for some elements(e.g., resultType, parameterType) to switch between custom alias and Java type.
There are many useful inspections to avoid careless mistakes which are difficult to find while coding.
There is a easier way to add @Param annotation to a specified parameter or all the parameters in a method.
The plugin also provides some useful file templates for mybatis to create them faster and make it easier to edit.
Cascade is supported for property editting in mapper xml and the property is linked to the property of Java bean. Any unknown property will be marked as error.
The plugin will generate selectKey element for insert statement when primary key is detected .