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>
相關文章
相關標籤/搜索