Hi

The <routes> and <rests> XML file do not support interceptors and the likes.

You can however use Spring Boot @ImportReource (or whatever that
annotation is named) to load a plain Spring XML file, where you can
define <camelContext> and do it the old fashion way.

On Mon, Oct 10, 2016 at 9:12 PM, sridharb <sridharb...@gmail.com> wrote:
> I am able to separate out the route definitions and rest-dsl routes in
> separate XML files in the folders camel and camel-rest in my Camel
> Application based on Spring boot. They are also loaded successfully upon
> startup.
>
> I now want to add interceptors to the routes so that I can have cross
> cutting concerns like caching to the routes.
>
> For that I want to use the interceptFrom camel feature so that globally all
> routes are intercepted. Ido not want to pollute the routes with the
> intercept logic
>
> The issue I am facing is I am not sure If adding the  the interceptFrom tags
> in XML file and loading them is supported or not. I want them to be loaded
> so that it would be read and added to the camelcontext automatically. I
> cannot add them as part of the route definitions which I have added them in
> the xml file in camel folder.
>
> Can someone advise me on the correct approach to load interceptors in my
> camel boot application based on spring boot.
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Load-interceptors-in-XML-file-in-camel-application-based-on-spring-boot-tp5788568.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to