- settiings 搜索File 找到 File and Code Templates
- 点击加号新建一个
- Name 输入文件名
- Extension 输入文件类型
<?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="#[[$namespace$]]#">
</mapper>
- 勾选Enable Live Templates
- 在mapper目录下新建刚才定义好的mapper
- 输入要引用的dao就可以开始在里面写方法啦