插件free mybatis plugins或者MyBatisX 在marketplace中下载下载完成之后重启idea接口中按alt+enter如下图 选择xml文件所在文件夹 方法类似,鼠标置于方法后按alt+enter