首页 > 其他分享 >IDEA报错之 元素类型为 "choose" 的内容必须匹配 "(when*,otherwise?)"。

IDEA报错之 元素类型为 "choose" 的内容必须匹配 "(when*,otherwise?)"。

时间:2022-08-16 15:01:36浏览次数:73  
标签:mapper when IDEA 报错 choose org Cause

IDEA报出的错误提示如下:

Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 91; columnNumber: 22; 元素类型为 "choose" 的内容必须匹配 "(when*,otherwise?)"。

问题原因:

  mapper文件里面有非法注释,导致mapper文件里的sql语句失效
  合法注释应为:<!-- -->

解决方案:

  仔细想想自己在哪个mapper文件新增了注释

标签:mapper,when,IDEA,报错,choose,org,Cause
From: https://www.cnblogs.com/wangfei-xsy/p/16591587.html

相关文章