hudi
hudi

Reputation: 16525

How to add new line in spring application context as map value

in my application context in spring I have defined a map:

<util:map map-class="java.util.concurrent.ConcurrentHashMap">                        
                        <entry key="test" value="here I need to add new line" />
                    </util:map>

in value I need to add new line:

I try:

 <entry key="test" value="s
s" />

or

 <entry key="test" value="s\ns" />

but with no success

please help me

Upvotes: 2

Views: 1173

Answers (1)

Evgeniy Dorofeev
Evgeniy Dorofeev

Reputation: 136012

try http://en.wikipedia.org/wiki/Numeric_character_reference

<util:map id="map" map-class="java.util.concurrent.ConcurrentHashMap">
    <entry key="test" value="s&#10;s" />
</util:map>

Upvotes: 2

Related Questions