首页 > 代码库 > Exception:HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

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

主要错误信息如下:

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=""

 

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