Вопрос

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?

Это было полезно?

Решение

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>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top