idea创建mapper.xml文件

Posted 三月老泉

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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即可

 

以上是关于idea创建mapper.xml文件的主要内容,如果未能解决你的问题,请参考以下文章