Question

I'm thinking about migrating our project from spring dsl to java dsl but I wouldn't like to rewrite the whole config at once. How to use two configs(xml and java) together in camel? Is it reasonable to mix both approach at all?

Était-ce utile?

La solution

It's totally reasonable. Reference your RouteBuilder that defines the Java DSL routes first, then any Spring routes like below.

<bean id="customerRoute" class="cc.notsoclever.examples.cxf.wsdlfirst.server.CustomerServiceRoutes">
</bean>

<camel:camelContext xmlns="http://camel.apache.org/schema/spring">
    <routeBuilder ref="customerRoute"/>
    <route id="bar">
        <from uri="direct:bar"/>
        <to uri="mock:bar"/>
    </route>
</camel:camelContext>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top