元素类型为 "resultMap" 的内容必须匹配 "(constructor?,id*,result*,association*,collection*,discriminator?)"

在使用mybatis时由于联合了其他的表,用到了resultMap,之后外加association这一项。可是在替换对应字段的位置上加上association总是报错。

解决:resultMap的中顺序必须是

<resultMap>

  <id></id>

  <result />

  ......

  <association />

  .....

  <collection/>

</resultMap>

posted @ 2019-12-18 10:43  灵丶诚  阅读(2357)  评论(0编辑  收藏  举报