nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
这是因为mybatis的mapper文件是xml格式的,所以不允许出现类似“>”这样的字符,解决方案如下:
方案一:
< | < | 小于号 |
> | > | 大于号 |
& | & | 和 |
' | ’ | 单引号 |
" | ” | 双引号 |
方案二:
可以使用
<![CDATA[ when min(starttime)<='12:00' and max(endtime)<='12:00' ]]>
参考资料:
1、 mybatis在xml中处理大于号,解决The content of elements must consist of well-formed character data or markup
https://blog.csdn.net/Lin_xiaofeng/article/details/79128291
2、mybatis异常:The content of elements must consist of well-formed character data or markup.
https://blog.csdn.net/wlsyn/article/details/8279422