SpringBoot之配置自定义新建文件

SpringBoot之配置自定义新建文件

适用于自定义mapper.xml文件

1.找到相关设置

1

2.点击+,新建一个模板在这里插入图片描述

3.mapper.xml文件的模板我放在图片下面了在这里插入图片描述

复制粘贴到上图右侧中间黑框里就行
然后apply应用就行

<?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>

这样就行了在这里插入图片描述

这里比如我们要新建StudentMapper.xml,命名时如下图就行

在这里插入图片描述
命名StudentMapper就得到StudentMapper.xml
命名Student就得到Student.xml文件

猜你喜欢

转载自blog.csdn.net/m0_51390535/article/details/121440218