最近在使用mybatis,然后用到了小于等于,直接在XML中使用了<=,结果XML文件一直显示红色错误,如下: sum(case when p.pool_year <= '2014' then p.pool_rmb else 0 end) as "one", 猜想可能是由于特殊字符的缘故,于是用了转义字符进行了替换了,如下: sum(case when p.pool_year <= '2014' then p.pool_rmb else 0 end) as "one", 记录下来,防止以后出错。 xml中常用转义字符:
<
< 小于号>
> 大于号&
& 和'
'单引号"
"双引号扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有