mybatis映射文件sql语句的返回结果集中使用resultType标签和resultMap标签的区别

resultMap:当使用resultMap做SQL语句返回结果类型处理时,通常需要在mapper.xml中定义resultMap进行pojo和相应表字段的对应。

当未定义resultMap,误把resultType写作resultMap时,会报下面的错误。
org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.xsd.domain.User
解决方法:resultType标签改为resultMap标签

相关文章:

  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
猜你喜欢
  • 2021-09-05
  • 2021-05-14
  • 2021-12-28
  • 2022-12-23
  • 2021-04-12
  • 2021-11-09
相关资源
相似解决方案