Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
2.16.4, 2.24.1
-
None
-
None
-
Unknown
-
Regression
Description
Unable to parse $simple{}, when you have prefixToken="${" suffixToken="}" in the propertyPlaceholder.
For example -
<camelContext xmlns="http://camel.apache.org/schema/spring"> <propertyPlaceholder id="ignoreId" location="classpath:props.properties" prefixToken="${" suffixToken="}"/> <route id="sendNotification"> <from uri="jms:queue:queue.sendNotification"/> <to uri="file:${OnDemand.output.url}?fileName=L2W.$simple{in.header.accountNum}-${date:now:yyyyMMddHHmmssSSS}.csv"/> </route> </camelContext>
In the above route ${OnDemand.output.url} is a Spring property placeholders and $simple{in.header.accountNum} is a camel property placeholder.
Note:- This route configuration used to work till Camel 2.12
According to 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/$simple{in.header.CamelFileName}</simple </setHeader>
Replication - camel-test.zip attached. Main class - CamelHelloWorldSpringExample.java
Attachments
Attachments
Issue Links
- relates to
-
CAMEL-13760 camel3 - Property placeholder - Deprecate changing prefix/suffix tokens
- Resolved