4.12. XML ルートの追加
デフォルトでは、Camel XML ルートを camel-spring-boot が自動検出して含めるディレクトリー camel の下のクラスパスに配置できます。Camel バージョン 2.17 以降では、以下に示すように、設定オプションを使用してディレクトリー名を設定したり、この機能を無効にすることができます。
// turn off camel.springboot.xmlRoutes = false // scan in the com/foo/routes classpath camel.springboot.xmlRoutes = classpath:com/foo/routes/*.xml
// turn off
camel.springboot.xmlRoutes = false
// scan in the com/foo/routes classpath
camel.springboot.xmlRoutes = classpath:com/foo/routes/*.xml
注記
XML ファイルは Camel XML ルートであり、次のような CamelContext ではありません。
<camelContext> と Spring XML ファイルを使用する場合、Camel を Spring XML ファイルおよび application.properties ファイルで設定できます。たとえば、Camel に名前を設定し、ストリームキャッシュを有効にするには、以下を追加します。
camel.springboot.name = MyCamel camel.springboot.stream-caching-enabled=true
camel.springboot.name = MyCamel
camel.springboot.stream-caching-enabled=true