映射配置文件包含了数据和对象之间的映射关系以及要执行的 SQL 语句
作用:将数据库SQL语句封装在配置文件
在代码中 直接通过
名称空间 namespace=“StudentMapper” 点 属性 id=“selectAll”
就能是代码 找到映射文件中 封装的 SQL语句 并使用
mapper:核心根标签
namespace属性:名称空间
-->
<mapper namespace="StudentMapper">
<!--
select:查询功能的标签
id属性:唯一标识
resultType属性:指定结果映射对象类型
parameterType属性:指定参数映射对象类型
-->
<select id="selectAll" resultType="student">
SELECT * FROM student
</select>
<select id