mybatis 返回Map类型key改为小写

来源:互联网 发布:大庆seo推广 编辑:程序博客网 时间:2024/05/28 23:11

默认情况下,当resultType=“java.util.Map”时,返回的key值都是大写的。

现在想key改成自己想要的,只需为查询出来的字段增加个别名即可。

如:

<select id="getStudentList" resultType="java.util.Map">

select t.name as "sName",t.sex as "sSex"

        from student

</select>

原创粉丝点击