Discussion:
using springdsl instead of javadsl with file path
Wang Yan
2018-11-20 09:28:30 UTC
Permalink
using springdsl instead of javadsl, below is the example from camel website,

is it possible to use file instead of classpath for configuration? for example

camel.springboot.xmlRoutes = file:/com/foo/routes/*.xml

any suggestions and hints are more than welcome!

// turn off
camel.springboot.xmlRoutes = false
// scan in the com/foo/routes classpath
camel.springboot.xmlRoutes = classpath:com/foo/routes/*.xml

The XML files should be Camel XML routes (not CamelContext) such as

<routes xmlns="http://camel.apache.org/schema/spring">
<route id="test">
<from uri="timer://trigger"/>
<transform>
<simple>ref:myBean</simple>
</transform>
<to uri="log:out"/>
</route>
</routes>
Gandhi, Vineet
2018-11-20 10:04:54 UTC
Permalink
Hi wang,

Yes we can give file paths for picking up routes during startup too.

camel.springboot.xmlRoutes = on
camel.springboot.xmlRoutes = file:/xxxx/xxxxx/xxxxxxx/*.xml

I tested in my local and its working.

Regards,
Vineet

On 20/11/18, 3:24 PM, "Wang Yan" <***@gmail.com> wrote:

using springdsl instead of javadsl, below is the example from camel website,

is it possible to use file instead of classpath for configuration? for example

camel.springboot.xmlRoutes = file:/com/foo/routes/*.xml

any suggestions and hints are more than welcome!

// turn off
camel.springboot.xmlRoutes = false
// scan in the com/foo/routes classpath
camel.springboot.xmlRoutes = classpath:com/foo/routes/*.xml

The XML files should be Camel XML routes (not CamelContext) such as

<routes xmlns="http://camel.apache.org/schema/spring">
<route id="test">
<from uri="timer://trigger"/>
<transform>
<simple>ref:myBean</simple>
</transform>
<to uri="log:out"/>
</route>
</routes>



This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this me
Wang Yan
2018-12-05 10:11:40 UTC
Permalink
it does not work got exception as below

#camel xmlroute scan
camel.springboot.xmlRoutes: on
camel.springboot.xmlRoutes: file:camel/*.xml


Caused by: java.lang.IllegalStateException: duplicate key:
camel.springboot.xmlRoutes

---------- Forwarded message ---------
From: Wang Yan <***@gmail.com>
Date: Tue, Nov 20, 2018 at 10:28 AM
Subject: using springdsl instead of javadsl with file path
To: <***@camel.apache.org>




using springdsl instead of javadsl, below is the example from camel website,

is it possible to use file instead of classpath for configuration? for example

camel.springboot.xmlRoutes = file:/com/foo/routes/*.xml

any suggestions and hints are more than welcome!

// turn off
camel.springboot.xmlRoutes = false
// scan in the com/foo/routes classpath
camel.springboot.xmlRoutes = classpath:com/foo/routes/*.xml

The XML files should be Camel XML routes (not CamelContext) such as

<routes xmlns="http://camel.apache.org/schema/spring">
<route id="test">
<from uri="timer://trigger"/>
<transform>
<simple>ref:myBean</simple>
</transform>
<to uri="log:out"/>
</route>
</routes>
Claus Ibsen
2018-12-05 10:14:13 UTC
Permalink
Hi

Maybe try separating mutliple paths with comma and only have 1 key
Post by Wang Yan
it does not work got exception as below
#camel xmlroute scan
camel.springboot.xmlRoutes: on
camel.springboot.xmlRoutes: file:camel/*.xml
camel.springboot.xmlRoutes
---------- Forwarded message ---------
Date: Tue, Nov 20, 2018 at 10:28 AM
Subject: using springdsl instead of javadsl with file path
using springdsl instead of javadsl, below is the example from camel website,
is it possible to use file instead of classpath for configuration? for example
camel.springboot.xmlRoutes = file:/com/foo/routes/*.xml
any suggestions and hints are more than welcome!
// turn off
camel.springboot.xmlRoutes = false
// scan in the com/foo/routes classpath
camel.springboot.xmlRoutes = classpath:com/foo/routes/*.xml
The XML files should be Camel XML routes (not CamelContext) such as
<routes xmlns="http://camel.apache.org/schema/spring">
<route id="test">
<from uri="timer://trigger"/>
<transform>
<simple>ref:myBean</simple>
</transform>
<to uri="log:out"/>
</route>
</routes>
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Wang Yan
2018-12-05 13:23:02 UTC
Permalink
it seems only support keyword classpath but not file

camel.springboot.xmlRoutes: classpath:camel/*.xml



---------- Forwarded message ---------
From: Wang Yan <***@gmail.com>
Date: Wed, Dec 5, 2018 at 11:11 AM
Subject: Fwd: using springdsl instead of javadsl with file path
To: <***@camel.apache.org>



it does not work got exception as below

#camel xmlroute scan
camel.springboot.xmlRoutes: on
camel.springboot.xmlRoutes: file:camel/*.xml


Caused by: java.lang.IllegalStateException: duplicate key:
camel.springboot.xmlRoutes

---------- Forwarded message ---------
From: Wang Yan <***@gmail.com>
Date: Tue, Nov 20, 2018 at 10:28 AM
Subject: using springdsl instead of javadsl with file path
To: <***@camel.apache.org>




using springdsl instead of javadsl, below is the example from camel website,

is it possible to use file instead of classpath for configuration? for example

camel.springboot.xmlRoutes = file:/com/foo/routes/*.xml

any suggestions and hints are more than welcome!

// turn off
camel.springboot.xmlRoutes = false
// scan in the com/foo/routes classpath
camel.springboot.xmlRoutes = classpath:com/foo/routes/*.xml

The XML files should be Camel XML routes (not CamelContext) such as

<routes xmlns="http://camel.apache.org/schema/spring">
<route id="test">
<from uri="timer://trigger"/>
<transform>
<simple>ref:myBean</simple>
</transform>
<to uri="log:out"/>
</route>
</routes>
Claus Ibsen
2018-12-06 08:31:03 UTC
Permalink
Post by Wang Yan
it seems only support keyword classpath but not file
camel.springboot.xmlRoutes: classpath:camel/*.xml
Maybe it does, you are welcome to dive into the source code and take a
look at it.
And also to log a JIRA ticket to ask for file: support in this feature.
Post by Wang Yan
---------- Forwarded message ---------
Date: Wed, Dec 5, 2018 at 11:11 AM
Subject: Fwd: using springdsl instead of javadsl with file path
it does not work got exception as below
#camel xmlroute scan
camel.springboot.xmlRoutes: on
camel.springboot.xmlRoutes: file:camel/*.xml
camel.springboot.xmlRoutes
---------- Forwarded message ---------
Date: Tue, Nov 20, 2018 at 10:28 AM
Subject: using springdsl instead of javadsl with file path
using springdsl instead of javadsl, below is the example from camel website,
is it possible to use file instead of classpath for configuration? for example
camel.springboot.xmlRoutes = file:/com/foo/routes/*.xml
any suggestions and hints are more than welcome!
// turn off
camel.springboot.xmlRoutes = false
// scan in the com/foo/routes classpath
camel.springboot.xmlRoutes = classpath:com/foo/routes/*.xml
The XML files should be Camel XML routes (not CamelContext) such as
<routes xmlns="http://camel.apache.org/schema/spring">
<route id="test">
<from uri="timer://trigger"/>
<transform>
<simple>ref:myBean</simple>
</transform>
<to uri="log:out"/>
</route>
</routes>
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Loading...