On Fri, Mar 28, 2014 at 9:29 AM, bilalalp <syme...@gmail.com> wrote: > Hi everyone, > > I wonder if i can give parameters of a route with a bean to my route. > > For ex: > > instead of this: > > <route> > <from > uri="sftp://localhost:9999/root?username=admin&password=admin&proxy=#proxy"/> > <to uri="bean:processFile"/> > </route> > > can i do that? > > <bean id="sftpParams" class".."> > <property name="username" value="admin"/> > <property name="password" value="admin"/> > <property name="proxy" ref="proxy"/> > </bean> >
You can define the endpoint as a bean <bean id="mysftp" class="...SftpComponent"> ... parameters here </bean> <from ref="mysftp"/> > <route> > <from uri="sftp://localhost:9999/root?paramBean=#sftpParams"/> > <to uri="bean:processFile"/> > </route> > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Route-Parameters-Bean-tp5749476.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io