Could not find result map XXX 解决办法


严重: Servlet.service() for servlet [contrloSite] in context with path [/FourthSSM] threw exception [Request processing failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.jsx.pojo.Student] with root cause
java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.jsx.pojo.Student

这个错误的意思是:返回的结果和类型不一致。 

错误代码:

  

   

 


出错原因: 
  传进来的参数应该是QueryBase对象,其中包含了查询需要的Map参数数组,返回值类型应该是BaseResultMap,可能是一条记录也可能是多条记录。 
 

正确代码:

  
   




你可能感兴趣的:(【BUG总结】)