Camel がコンテナーコンテキスト (たとえば、ルートビルダーインスタンスの Spring ApplicationContext) をスキャンできます。これにより、Spring の <component-scan> 機能を使用して、スキャンプロセスで Spring によって作成された RouteBuilder インスタンスを Camel にピックアップさせることができます。
<!-- enable Spring @Component scan -->
<context:component-scan base-package="org.apache.camel.spring.issues.contextscan"/>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<!-- and then let Camel use those @Component scanned route builders -->
<contextScan/>
</camelContext>
<!-- enable Spring @Component scan -->
<context:component-scan base-package="org.apache.camel.spring.issues.contextscan"/>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<!-- and then let Camel use those @Component scanned route builders -->
<contextScan/>
</camelContext>
Copy to ClipboardCopied!Toggle word wrapToggle overflow