Open the Settings of IDEA

Search for File and Code Templates and copy the mapper. XML Templates into it


      
<! DOCTYPEmapper
PUBLIC "- / / mybatis.org//DTD Mapper / 3.0 / EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 
<mapper namespace="">
 
</mapper>
Copy the code

You can see the template you just created in the new file