1.打开File -->Settings -->Editor–>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>