Bootstrap

MyBatis查询,返回值Map或List<Map>

一、返回值Map
1、mapper.xml

 	<select id="queryOne" resultType="java.util.HashMap">
        select username,name,code from student where id = #{id};
    </select>

2、接口定义

Map<String,String> queryOne(Integer id);

;