20 lines
659 B
XML
20 lines
659 B
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">
|
||
<!--
|
||
1.在mybats的开发中namespace有特殊的意思,一定要是对应接口的全限定名
|
||
通过namespace可以简历mapper.xml和接口之间的关系(名字不重要,位置不重要)
|
||
-->
|
||
<mapper namespace="com.bw.dao.StudentDao">
|
||
<insert id="add">
|
||
insert into t_student VALUES (null,#{name},#{age})
|
||
</insert>
|
||
<delete id="delect">
|
||
|
||
</delete>
|
||
|
||
|
||
<select id="StudentList" resultType="com.bwie.pojo.Student">
|
||
select * from t_student
|
||
</select>
|
||
</mapper> |