Mybatis添加一对一关联查询的时候,就是添加association标签的时候出现这个错误。
The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collection*,discriminator?)".
原图
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsIiNwYTMxgDN4EDMyETM1EDMy8CX0Vmbu4GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.jpg)
查找了半天,然后发现是顺序导致了The content of element type “resultMap” must match “(constructor?,id*,result*,association*,collectio
这个错误
修改一下顺序即可
修改后的图片