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.java

致使这个错误的缘由是:apache

mapper.xml中没有指定返回值类型app

<select id="getPhoneNum" >
        select phone_num from user_info where id = #{id}
</select>

修改后:ide

<select id="getPhoneNum" resultType="String">
        select phone_num  from user_info where id = #{id}
</select>
相关文章
相关标签/搜索