[ 
https://issues.apache.org/jira/browse/CAMEL-13758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Troy Smith updated CAMEL-13758:
-------------------------------
    Description: 
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:${OnDemand.output.url}?fileName=RPFPos_L2W.$simple\{in.header.accountNum}-${date:now:yyyyMMddHHmmssSSS}.csv"/>
 </route> </camelContext>}}


  
 
In the above route ${OnDemand.output.url}

{color:#333333}is a Spring property placeholders and 
$simple\{in.header.accountNum}{color} is a camel property placeholder.

{{{color:#205081}Note:- This route configuration used to work till Camel 
2.12{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}}{{/$simple\{in.header.CamelFileName}</simple 
</setHeader>}}

 

{{Replication - camel-test.zip attached. Main class - 
CamelHelloWorldSpringExample.java}}

  was:
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}}


> 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.16.4, 2.24.1
>            Reporter: Troy Smith
>            Priority: Minor
>         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:${OnDemand.output.url}?fileName=RPFPos_L2W.$simple\{in.header.accountNum}-${date:now:yyyyMMddHHmmssSSS}.csv"/>
>  </route> </camelContext>}}
>   
>  
> In the above route ${OnDemand.output.url}
> {color:#333333}is a Spring property placeholders and 
> $simple\{in.header.accountNum}{color} is a camel property placeholder.
> {{{color:#205081}Note:- This route configuration used to work till Camel 
> 2.12{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}}{{/$simple\{in.header.CamelFileName}</simple 
> </setHeader>}}
>  
> {{Replication - camel-test.zip attached. Main class - 
> CamelHelloWorldSpringExample.java}}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to