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

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

SQL Server - MyCTE query based on 24 hour period (next day) -

php - Using str_replace to translate a MySQL Table in html -