mybatis在xml文件中处理大于号小于号的方法
来源:互联网 发布:jquery.tip.js 编辑:程序博客网 时间:2024/05/07 02:59
第一种方法:
用了转义字符把>和<替换掉,然后就没有问题了。
SELECT * FROM test WHERE 1 = 1 AND start_date <= CURRENT_DATE AND end_date >= CURRENT_DATE
附:XML转义字符
<
<
小于号
>
>
大于号
&
&
和
'
’
单引号
"
"
双引号
第二种方法:
因为这个是xml格式的,所以不允许出现类似“>”这样的字符,但是都可以使用<![CDATA[ ]]>符号进行说明,将此类符号不进行解析
你的可以写成这个:
<![CDATA[ when min(starttime)<='12:00' and max(endtime)<='12:00' ]]>
- MyBatis学习 之 六、 mybatis在xml文件中处理大于号小于号的方法
- 【Mybatis】mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- mybatis在xml文件中处理大于号小于号的方法
- FastJSON实现详解
- Android Studio 中AIDL 的创建与使用详解
- 高精度运算
- 女程序员做了个梦,各路大神惊现神级评论!
- 弹出层 ajax请求在IE中的不能重复请求
- mybatis在xml文件中处理大于号小于号的方法
- 安卓之线程池
- 什么是内部类?Static Nested Class 和 Inner Class的不同。
- 使用xcode自带的git
- MySql查询优化 百万级记录查询优化 limit分页查询
- Exception:Batch update returned unexpected row count from update [0]; actual row count
- 关于The type com.fasterxml.jackson.core.JsonGenerator cannot be resolved. It is indirectly referenced
- 全连接,内连接,左连接,右连接
- 基于模板类的双向链表