You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Wang Yan <wy...@gmail.com> on 2018/12/05 10:11:40 UTC

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


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

---------- Forwarded message ---------
From: Wang Yan <wy...@gmail.com>
Date: Tue, Nov 20, 2018 at 10:28 AM
Subject: using springdsl instead of javadsl with file path
To: <us...@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>

Re: using springdsl instead of javadsl with file path

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Maybe try separating mutliple paths with comma and only have 1 key
On Wed, Dec 5, 2018 at 11:11 AM Wang Yan <wy...@gmail.com> wrote:
>
> 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 <wy...@gmail.com>
> Date: Tue, Nov 20, 2018 at 10:28 AM
> Subject: using springdsl instead of javadsl with file path
> To: <us...@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
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: using springdsl instead of javadsl with file path

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Dec 5, 2018 at 2:23 PM Wang Yan <wy...@gmail.com> wrote:
>
> 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.

>
>
> ---------- Forwarded message ---------
> From: Wang Yan <wy...@gmail.com>
> Date: Wed, Dec 5, 2018 at 11:11 AM
> Subject: Fwd: using springdsl instead of javadsl with file path
> To: <us...@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 <wy...@gmail.com>
> Date: Tue, Nov 20, 2018 at 10:28 AM
> Subject: using springdsl instead of javadsl with file path
> To: <us...@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
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Fwd: using springdsl instead of javadsl with file path

Posted by Wang Yan <wy...@gmail.com>.
it seems  only support keyword classpath but not file

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



---------- Forwarded message ---------
From: Wang Yan <wy...@gmail.com>
Date: Wed, Dec 5, 2018 at 11:11 AM
Subject: Fwd: using springdsl instead of javadsl with file path
To: <us...@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 <wy...@gmail.com>
Date: Tue, Nov 20, 2018 at 10:28 AM
Subject: using springdsl instead of javadsl with file path
To: <us...@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>