MyBatis 主配置文件 config.xml(这里可以自己起,不过后面带上Config.xml)
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<!-- 这里写配置内容 -->
</configuration>
MyBatis 映射文件 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="命名空间">
<!-- SQL语句 -->
</mapper>
原文链接:https://blog.csdn.net/abc5232033/article/details/79048621