天天看点

The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collectio

Mybatis添加一对一关联查询的时候,就是添加association标签的时候出现这个错误。

The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collection*,discriminator?)".           

原图

The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collectio

查找了半天,然后发现是顺序导致了The content of element type “resultMap” must match “(constructor?,id*,result*,association*,collectio

这个错误

修改一下顺序即可

修改后的图片

The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collectio

继续阅读