解决MyBatis异常:The content of elements must consist of well-formed character data or markup.

错误:The content of elements must consist of well-formed character data or markup.

分析:在MyBatis的映射文件中出现了特殊字符的情况下会出现以上错误。特殊字符有:  < 小于号 ,>大于号等

解决:要用<![CDATA[]]>包裹着。

<![CDATA[
  select * from tb_users where id<=100
]]>
posted @ 2019-10-22 13:40  Java-Legend  阅读(2530)  评论(0编辑  收藏  举报