<?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="cn.sun.dao.UserMapper">
<select id="findAll" resultType="cn.sun.pojo.User">
select * from user;
</select>
</mapper>
xxxMapper.xml
本文介绍了一种使用MyBatis框架进行用户信息查询的方法。通过定义XML映射文件,设置命名空间及SQL语句,实现对数据库中用户表的全字段查询。此配置适用于简单的数据检索场景。


被折叠的 条评论
为什么被折叠?



