一安装MyBatisCodeHelper-Pro
1.file->选择setting里面的plugins
2.在搜索框中输入MyBatisCodeHelper-Pro
3.安装该插件 ,重启idea即可使用
二.基本使用(未激活时可以使用的功能)
1. mapper接口和mapper文件之间的相互跳转
单击左边的图标就可以实现mapper接口和mapper文件之间对应方法的跳转功能
2 左边的图标更改:setting -> other settings -> MyBatisCodeHelper-Pro -> mapper icon 如下图:
3.自动重构
修改mapper映射文件中的标签的id属性值后,mapper接口中的对应方法名会自动进行修改,而且反之亦然
技巧01:将光标放到mapper映射文件中的标签的id属性值上或者mapper接口的方法名上,按 shift + F6 后就可以进行修改啦,修改完成后再按回车按钮进行确认操作
快捷键:shift + F6
4 .自动补全功能
编辑mapper映射文件中的内容时会自动进行补全操作
5.一键删除操作
mapper映射文件和mapper接口中有不对应时,mapper映射文件中的内容会变成灰色,mapper接口中的内容会变成红色;此时将光标放到这些区域按 alt + enter 后就可以选择补全对应代码或者进行一键删除操作