You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sujin sr <su...@gmail.com> on 2019/09/23 12:30:58 UTC

configuration value not injected for custom processor id

Hi,

I have a .yml file where all the route information has been defined, i have
injected the value into the route. But injected value has been applied for
route id and autostartup but value not has been applied for custom
processor id. I am using springboot to start the camel context

example route:
<route id="{{sample.route.myroute.id}}"
autoStartup="{{sample.route.myroute.autostart:true}}">
    <from uri="direct:my_route_end"/>
    <process id="{{sample.route.myroute.myprocessorid}}"
ref="mySampleProcessor"/>
    <choice>
....
</route>

In this route value has been applied for  sample.route.myroute.id and
sample.route.myroute.autostart but  value for
sample.route.myroute.myprocessorid not injected.

example yml file
sample:
  route:
    myroute:
    id: myrouteId
    processor:
      myprocessorid: mySampleProcessor
      secondprocessor: mysecondProcessor

Kindly help me with this !!!

Re: configuration value not injected for custom processor id

Posted by sujin sr <su...@gmail.com>.
Hi Jan Bednář,

I have done typo error while posting the question in the forum,
In actual code i have used {{sample.route.myroute.processor.myprocessorid}}
but it was not working.

The code snippet I have posted was a sample of actual code.


On Tue, 24 Sep 2019 at 01:06, Jan Bednář <ma...@janbednar.eu> wrote:

> Hi,
> you have probably meant to use
> {{sample.route.myroute.processor.myprocessorid}}
>
> Dne 23.9.2019 v 14:30 sujin sr napsal(a):
> > Hi,
> >
> > I have a .yml file where all the route information has been defined, i
> have
> > injected the value into the route. But injected value has been applied
> for
> > route id and autostartup but value not has been applied for custom
> > processor id. I am using springboot to start the camel context
> >
> > example route:
> > <route id="{{sample.route.myroute.id}}"
> > autoStartup="{{sample.route.myroute.autostart:true}}">
> >      <from uri="direct:my_route_end"/>
> >      <process id="{{sample.route.myroute.myprocessorid}}"
> > ref="mySampleProcessor"/>
> >      <choice>
> > ....
> > </route>
> >
> > In this route value has been applied for  sample.route.myroute.id and
> > sample.route.myroute.autostart but  value for
> > sample.route.myroute.myprocessorid not injected.
> >
> > example yml file
> > sample:
> >    route:
> >      myroute:
> >      id: myrouteId
> >      processor:
> >        myprocessorid: mySampleProcessor
> >        secondprocessor: mysecondProcessor
> >
> > Kindly help me with this !!!
> >
>
>

Re: configuration value not injected for custom processor id

Posted by Jan Bednář <ma...@janbednar.eu>.
Hi,
you have probably meant to use 
{{sample.route.myroute.processor.myprocessorid}}

Dne 23.9.2019 v 14:30 sujin sr napsal(a):
> Hi,
>
> I have a .yml file where all the route information has been defined, i have
> injected the value into the route. But injected value has been applied for
> route id and autostartup but value not has been applied for custom
> processor id. I am using springboot to start the camel context
>
> example route:
> <route id="{{sample.route.myroute.id}}"
> autoStartup="{{sample.route.myroute.autostart:true}}">
>      <from uri="direct:my_route_end"/>
>      <process id="{{sample.route.myroute.myprocessorid}}"
> ref="mySampleProcessor"/>
>      <choice>
> ....
> </route>
>
> In this route value has been applied for  sample.route.myroute.id and
> sample.route.myroute.autostart but  value for
> sample.route.myroute.myprocessorid not injected.
>
> example yml file
> sample:
>    route:
>      myroute:
>      id: myrouteId
>      processor:
>        myprocessorid: mySampleProcessor
>        secondprocessor: mysecondProcessor
>
> Kindly help me with this !!!
>