19 lines
664 B
XML
19 lines
664 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.UserDao">
|
||
|
||
|
||
<select id="login" resultType="com.bwie.pojo.User">
|
||
select * from t_user where user_name=#{userName} and user_pwd=#{userPwd}
|
||
</select>
|
||
<select id="UserList" resultType="com.bwie.pojo.User">
|
||
select * from t_user
|
||
</select>
|
||
|
||
|
||
</mapper> |