首页 > 移动平台 > 详细

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

时间:2017-09-15 12:04:42      阅读:529      评论:0      收藏:0      [点我收藏+]

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>


本文出自 “数据挖掘工程师的成长历程” 博客,请务必保留此出处http://qianqiansun.blog.51cto.com/13271301/1965502

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

原文:http://qianqiansun.blog.51cto.com/13271301/1965502

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!