idea创建mapper.xml文件

Posted on 2020-04-08 20:37  三月老泉  阅读(7714)  评论(0编辑  收藏  举报

 

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即可