初学SSM,碰到各种问题,现在遇到一个 返回数据集合显示有三条,但是内容都为null,网上各种方法都试过了
userInfoMapper.xml 文件:
<resultMap type="com.dms.model.UserInfo" id="UserInfo">
<id column="user_id" property="userId" jdbcType="INTEGER"/>
<result column="user_account" property="userAccount" jdbcType="VARCHAR"/>
<result column="user_password" property="userPassword" jdbcType="VARCHAR"/>
<result column="user_name" property="userName" jdbcType="VARCHAR"/>
<result column="user_sex" property="userSex" jdbcType="VARCHAR"/>
<result column="level_id" property="levelId" jdbcType="INTEGER"/>
<result column="ground_id" property="groundId" jdbcType="INTEGER"/>
<result column="user_tel" property="userTel" jdbcType="VARCHAR"/>
<result column="user_email" property="userEmail" jdbcType="VARCHAR"/>
<result column="user_post" property="userPost" jdbcType="INTEGER"/>
<result column="user_remark" property="userRemark" jdbcType="VARCHAR"/>
</resultMap>
<select id="findAllUser" resultMap="UserInfo">
select * from user_info
</select>
单元测试运行结果: