【问题标题】:How include < or > character in value of property of bean in spring?spring 如何在 bean 的属性值中包含 < 或 > 字符?
【发布时间】:2012-04-11 09:28:02
【问题描述】:

我有豆类:

<bean id="test">

...........
<property name="myQuery" value="select a,b,c from table1 where rownum < 10;" />

rownum &lt; 10 中的字符 &lt; 未被接受。我该如何解决这个问题?

【问题讨论】:

  • @Mat 正在为他解决这个问题 :-)

标签: java spring escaping character


【解决方案1】:

使用XML entities&amp;lt; 用于&lt;&amp;gt; 用于&gt;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-02-29
    • 2019-03-03
    • 2020-05-20
    • 1970-01-01
    • 1970-01-01
    • 2013-06-05
    • 2011-08-08
    相关资源
    最近更新 更多