解决方案
1、打开File-> Edit->File and Code Templates
2、新建模板
3、编写模板
<?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>
4、添加参数
$ {PACKAGE_NAME}:在其中创建新文件的包的名称
$ {NAME}:在“新建<TEMPLATE_NAME>”对话框中指定的新文件的名称
<?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="${PACKAGE_NAME}.${NAME}">
</mapper>
5、点击Apply。
6、使用模板
参考文章
https://blog.csdn.net/qq_41135254/article/details/96102670
https://blog.csdn.net/Dalon_G/article/details/84856272
https://blog.csdn.net/sinat_18132365/article/details/79582459