質問

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