最近在使用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 &lt;= '2014' then p.pool_rmb else 0 end) as "one",

记录下来,防止以后出错。
xml中常用转义字符:

  • &lt; < 小于号
  • &gt; > 大于号
  • &amp; & 和
  • &apos; '单引号
  • &quot; "双引号

相关文章:

  • 2022-03-09
  • 2022-12-23
  • 2022-02-06
  • 2022-12-23
  • 2022-12-23
  • 2022-02-20
  • 2022-12-23
  • 2022-02-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2021-08-12
相关资源
相似解决方案