码迷,mamicode.com
首页 > 其他好文 > 详细

mybatis 小于号 转义

时间:2016-12-14 14:02:41      阅读:399      评论:0      收藏:0      [点我收藏+]

标签:time   pos   组成   元素   转义   ati   编译   amp   datetime   

AND lbaq.watch_answer_start_datetime >= #{stm}
AND lbaq.watch_answer_end_datetime <= #{etm}

此时报错“元素内容必须由格式正确的字符数据或标记组成”,将大于号、小于号转义后,编译无错误

AND lbaq.watch_answer_start_datetime &gt;= #{stm}
AND lbaq.watch_answer_end_datetime &lt;= #{etm}

 

转义字符:

 &lt;   <  小于号

 &gt;  >  大于号

 &amp;  &  和 

 &apos;  ‘  单引号

&quot;   " 双引号

 

mybatis 小于号 转义

标签:time   pos   组成   元素   转义   ati   编译   amp   datetime   

原文地址:http://www.cnblogs.com/siesteven/p/6178691.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!