Mybatis异常
type="VideoVo" id="VideoResult">
property="videoId" column="video_id" />
property="deviceId" column="device_id" />
property="code" column="code" />
property="text" column="text" />
property="status" column="status" />
property="addr" column="addr" />
property="port" column="port" />
property="mac" column="mac" />
property="srsId" column="srs_id" />
property="userName" column="user_name" />
property="password" column="password" />
property="cmiId" column="cmi_id" />
property="creId" column="cre_id" />
property="creName" column="cre_name" />
property="creTime" column="cre_time" />
property="updId" column="upd_id" />
property="updName" column="upd_name" />
property="updTime" column="upd_time" />
property="cameraList" select="com.deerder.security.mapper.CameraMapper.selectCameraByVideoId" column="video_id">
property="cmiCode" column="cmi_code" />
property="cmiName" column="cmi_name" />
property="deviceCode" column="device_code" />
property="deviceText" column="device_text" />
会爆异常:Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 17; 元素类型为 “resultMap” 的内容必须匹配 “(constructor?,id*,result*,association*,collection*,discriminator?)”。
resultmap内的属性必须遵从(constructor?,id*,result*,association*,collection*,discriminator?)这样的一个顺序
将一下放到collection前面就解决了问题
property="cmiCode" column="cmi_code" />
property="cmiName" column="cmi_name" />
property="deviceCode" column="device_code" />
property="deviceText" column="device_text" />