publicclassOsEntity{private String Filesystem;private String Used;private String Mounted;...get() and set()}
表中数据
filesystem
used
mounted
test.txt
50
/file
test2.txt
60
/file1
test3.txt
50
/file2
test4.txt
80
/file3
第一种*
可以通过在查询的SQL语句中定义字段的别名,让字段名的别名和实体类的属性名一致。
<selectid="getUserById"parameterType="int"resultType="cn.truedei.entity.OsEntity">
select filesystem Filesystem,used Used where mounted = #{Mounted}
</select>