2

My mybatis mapper file always report the following error message:

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

and here is my resultMap config:

<resultMap type="com.sp.sysmanage.domain.UserInfoDO" id="user">
    <result column="USER_ID" property="userID"/>  
    <result column="USER_USERNAME" property="userName"/>
    <result column="USER_PASSWORD" property="password"/>
    <result column="USER_FIRST_LOGIN" property="firstLogin"/>
    <result column="USER_LAST_LOGIN_DATE" property="lastLoginDate"/>
    <reulst column="USER_STATUS" property="status"/>
</resultMap>

Anyone can help to see what detailed error in my resultMap config?

wittich
  • 2,079
  • 2
  • 27
  • 50
wang alex
  • 51
  • 2
  • 5

2 Answers2

3

As the error is saying:

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

the order is important:

first constructor

then <id>

then <result>

then <association>

then <collection>

then discriminator

HibaHasan
  • 1,255
  • 2
  • 5
  • 12
2

There is a typo: <reulst> at the end, it should be <result>

MohamedSanaulla
  • 6,112
  • 5
  • 28
  • 45
  • in my case, that was a comment that was not compatible with XML (`//` instead of `<!- ->`) – Sam Jul 21 '18 at 04:18