您的位置:首页 > 移动开发

A query was run and no Result Maps were found for the Mapped Statement

2017-09-15 10:45 716 查看
Cause: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'com.shadow.foretaste.UserInfoDao.getPhoneNum'. It's likely that neither a Result Type nor a Result Map was specified.
导致这个错误的原因是:
mapper.xml中没有指定返回值类型
<select id="getPhoneNum" >
select phone_num from user_info where id = #{id}
</select>
修改后:
<select id="getPhoneNum" resultType="String">
select phone_num  from user_info where id = #{id}
</select>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  A query was
相关文章推荐