idea创建mapper.xml文件

1.点击File --->Settings --->file and code template-->点击+ --> 设置name-->选择模版文件后缀--> 添加模版内容--> 点击ok

步骤如下图

模版内容:

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="">


</mapper>

2、然后新建mapper.xml文件,点击mapper即可

原文地址:https://www.cnblogs.com/wenhuang/p/12662606.html