Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException: Element type "result" must be followed by either attribute specifications, ">" or "/>".
at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:256)
...
Caused by: org.xml.sax.SAXParseException: Element type "result" must be followed by either attribute specifications, ">" or "/>".
MyBatis Mapper XML 檔案中 <result> 元素語法錯誤,常見情況:
<result column=id property=id> 應為 <result column="id" property="id"/>/> 或 ><、>、& 需使用 CDATA 或實體編碼<result>、<resultMap> 標籤語法。mapper 路徑指向正確檔案。<!-- 錯誤寫法 -->
<result column=id property=id>
<!-- 正確寫法 -->
<result column="id" property="id"/>
<!-- 或 -->
<result column="id" property="id"></result>