Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13758

Unable to parse $simple{}, when you have prefixToken="${" suffixToken="}" in the propertyPlaceholder

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.16.4, 2.24.1
    • Fix Version/s: None
    • Component/s: came-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown
    • Regression:
      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

        1. log.log
          6 kB
          Rajiv
        2. camel-test.zip
          16 kB
          Rajiv

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                Troy Smith Rajiv
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: