idea项目中添加mapper.xml文件样例

1.点击File --->Settings --->步骤如下图

idea项目中添加mapper.xml文件样例

 

模板内容

 

<?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>

 

然后新建mapper.xml文件

idea项目中添加mapper.xml文件样例

点击mapper即可

2.添加其他模板方法同上