Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
mybatis written in SQL mapper.xml file and parse xml <,>, <=,> = to be wrong, then you should use an escape wording.
A manner
<<=>> = ' "
<<=>> =' '
Example:
<if test="startDate != null">
t1.NORM_RETURN_DATE >= #{startDate}
</if>
Second way
<! [CDATA [sql statement]]>Example:
<if test="endDate != null">
t1.NORM_RETURN_DATE <= #{endDate}
</if>