mybatis的xml文件中的CDATA的使用
<!--查询列表--> <select id="queryListPage" parameterType="java.util.Map" resultType="java.util.Map"> select * from user where 1=1 <if test="startDate != null and startDate != ''"> <![CDATA[and DATE_FORMAT(CREATE_DATA,"%Y-%m-%d") >= #{startDate}]]> </if> <if test="endDate != null and endDate != ''"> <![CDATA[and DATE_FORMAT(CREATE_DATA,"%Y-%m-%d") <= #{endDate}]]> </if> <if test="PAGE_INDEX !=null and PAGE_SIZE !=''"> LIMIT ${PAGE_INDEX},${PAGE_SIZE} </if> </select>