Mybatis mapper.xml报错,The content of elements must consist of well-formed character data or markup

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/chenbetter1996/article/details/82805901

The content of elements must consist of well-formed character data or markup 

配置的sql语句并没有错

这个错误意译为这个元素(指 “<")后面必须有内容和结束标志(指">")

也就是它把sql语句中的小于号 "<"(miner < 10)当作标签的开始。

解决方法:

在sql语句前后添加标识符 <![CDATA[  sql  ]]>

猜你喜欢

转载自blog.csdn.net/chenbetter1996/article/details/82805901