Exception:HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

时间:2024-01-05 19:42:26

主要错误信息如下:

HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.lang.RuntimeException: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

原因:

在MyBatis的配置文件   mapper.xml 中,将返回类型为  Map 的数据定义成了resultMap

 <select id="selectAdminById" parameterType="java.lang.Integer"  resultMap="Map" >
select ...... from user where id= #{}
</select>

正确的定义应该为:resultType=""