1.在映射文件中重新命名
<select id="selectStuById" resultType="Stu">
SELECT sid AS id,sname AS NAME,sage age from stu where sid=#{idxxxx}
</select>
2.查询过后使用resultMap
1.在映射文件中重新命名
<select id="selectStuById" resultType="Stu">
SELECT sid AS id,sname AS NAME,sage age from stu where sid=#{idxxxx}
</select>
2.查询过后使用resultMap