spring - Prevent system properties/variables being evaluated in Java properties? -


i using spring load properties:

<util:properties id="service-properties">         ...         <prop key="postscript"></prop>         ...  </util:properties>  <bean class="org.springframework.beans.factory.config.propertyplaceholderconfigurer" id="propertyconfigurer"><property name="properties" ref="service-properties" /> </bean> 

however, 1 of properties can have value following (this camel xml simple language snippet):

postscript=<setbody><simple>${in.header.type}</simple></setbody> 

the problem, when value of property, is:

postscript=<setbody><simple></simple></setbody> 

i think seems trying resolve ${in.header.type} variable, thinking system variable maybe?

i'd know how stop variable being resolved? i've tried escaping quotes no good.

got answer camel docs :-)

http://camel.apache.org/simple.html

alternative syntax

from camel 2.5 onwards can use alternative syntax uses $simple{ } placeholders. can used in situations avoid clashes when using example spring property placeholder camel.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -