IDEA配置MyBatis的Mapper.xml模板

1,017 阅读1分钟

打开IDEA的Settings

image.png

搜索File and Code Templates,将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>

image.png

在新建文件中可以看到刚刚的模板

image.png