A query was run and no Result Maps were found for the Mapped Statement
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了A query was run and no Result Maps were found for the Mapped Statement相关的知识,希望对你有一定的参考价值。
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的主要内容,如果未能解决你的问题,请参考以下文章
A query was run and no Result Maps were found for the Mapped Statement
出错:Cause: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were foun
MyBatis报错:A query was run and no Result Maps were found for the Mapped Statement
MyBatis报错:A query was run and no Result Maps were found for the Mapped Statement
MyBatis报错:A query was run and no Result Maps were found for the Mapped Statement
ExecutorException: A query was run and no Result Maps were found for the Mapped Statement ‘com.win.m