问题:属性名和字段名不一致
解决方法
select id, username, password as pwd from db4.user
resultMap结果集映射
id username password 数据库----cloumn
id username pwd 实体类----property
<resultMap id="UserMap" type="User">
<result column="id" property="id"/>
<result column="username" property="username"/>
<result column="password" property="pwd"/>
</resultMap>
<select id="getUserList" resultMap="UserMap">
select id, username, password
from db4.user
</select>
日志
日志工厂
<settings>
<setting name="logImpl" value="STDOUT_LOGGING"/>
</settings>
resultMap,日志