Troy Smith created CAMEL-13758:
----------------------------------
Summary: Unable to parse $simple{}, when you have prefixToken="${"
suffixToken="}" in the propertyPlaceholder
Key: CAMEL-13758
URL: https://issues.apache.org/jira/browse/CAMEL-13758
Project: Camel
Issue Type: Bug
Components: came-core
Affects Versions: 2.24.1, 2.16.4
Reporter: Troy Smith
Attachments: camel-test.zip, log.log
Unable to parse $simple{}, when you have
prefixToken={color:#14892c}"$\{"{color} suffixToken={color:#14892c}"}{color}"
in the propertyPlaceholder.
For example -
{{<camelContext xmlns="http://camel.apache.org/schema/spring">
<propertyPlaceholder id="ignoreId" location="classpath:reformMB.properties"
prefixToken="$\{" suffixToken="}"/> }}
{{<route id="sendNotification"> <from uri="jms:queue:queue.sendNotification"/>
<to
uri="file:${color:#14892c}{OnDemand.output.url}{color}?fileName=RPFPos_L2W.{color:#f6c342}$simple\{in.header.accountNum}{color}-{color:#f6c342}$simple\{date:now:yyyyMMddHHmmssSSS}.csv{color}"/>
}}
{{</route> }}
{{</camelContext>}}
{{In the above route ${color:#14892c}{OnDemand.output.url} {color:#333333}is a
Spring property placeholders and
{color:#f6c342}$simple\{in.header.accountNum}{color} is a camel property
placeholder.{color}{color}}}
{{{color:#14892c}{color:#333333}Note:- This route configuration used to work
till Camel 2.12{color}{color}}}
{{According to [documentation
|[https://github.com/apache/camel/blob/master/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc]
]- one should be able to refer to Camel's properties using $simple\{...} like
this:}}
{{<setHeader headerName="Exchange.FILE_NAME">
<simple>\{{file.rootdir}}/{color:#f6c342}$simple\{in.header.CamelFileName}{color}</simple
</setHeader>}}
{{Replication - camel-test.zip attached. Main class -
CamelHelloWorldSpringExample.java}}
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)