intellij idea中安装、配置mybatis插件Free Mybatis plugin的教程详解

来自:网络
时间:2020-10-14
阅读:

场景:

使用intellij idea开发,持久层dao使用了mybatis,经常需要编辑mybatis的××Mapper.java和××Mapper.xml,因为是接口里一个方法对应xml里的一个SQL的id,当需要找找个方法时候得拷贝找个方法名,然后在对应文件中ctrl+f全文查找,相当麻烦。本篇讲述的使用mybatis的插件后将极大的提高效率。效果如图:

intellij idea中安装、配置mybatis插件Free Mybatis plugin的教程详解

即从××Mapper.java接口和××Mapper.xml中能由箭头直接点进去查看相对应的方法及SQL。

步骤:

1、ctrl+alt+s快捷键(或者选中FIle——>Settings)进入idea设置页面

intellij idea中安装、配置mybatis插件Free Mybatis plugin的教程详解

2、选中Plugins,并搜索点击Browse repositories项

intellij idea中安装、配置mybatis插件Free Mybatis plugin的教程详解

3、输入mybatis并选择所搜结果中的Free Mybatis plugin插件,Install即可

intellij idea中安装、配置mybatis插件Free Mybatis plugin的教程详解

4、装好后,需要重新启动才会生效。重启后再去看mybatis的接口和xml,发现出现了绿色箭头,通过这个箭头便可在两者之间直接跳转

intellij idea中安装、配置mybatis插件Free Mybatis plugin的教程详解

返回顶部
顶部