<?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">
<!--namespace=绑定要给对应的Dao/mapper接口-->
<mapper namespace="com.gao.dao.UserMapper">
<!--分页-->
<select id="getUserByLimit" parameterType="map" resultType="com.gao.pojo.User">
select * from mybatis.user limit #{startIndex},#{pageSize};
</select>
</mapper>
package com.gao.dao;
import com.gao.pojo.User;
import com.gao.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;
import java.util.HashMap;
import java.util.List;
public class UserDaoTest {
@Test
public void getUserByLimit(){
SqlSession sqlSession = MybatisUtils.getSqlSe
|