MyBatis的转义
mybatis 中 SQL 写在mapper.xml文件中,而xml解析 < 、>、<=、>= 时会出错,这时应该使用转义写法。有两种解决方案:
方案一:
< <= > >= ' " &
< <= > >= ' " &
方案二:
<![CDATA[ sql语句 ]]>
num <![CDATA[ >= ]]> #{num}
原文链接:https://blog.csdn.net/xiaowanzi_zj/article/details/124706018