6.12. XML 경로 추가
기본적으로 Camel XML 경로를 classpath에 배치하면 camel-spring-boot
가 자동으로 탐지되고 포함됩니다. 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 파일은 다음과 같이 CamelContext
경로가 아닌 Camel XML 경로여야 합니다.
<camelContext>와 함께 Spring XML 파일을 사용하는 경우 Spring XML 파일 및 application.properties 파일에서 Camel을 구성할 수 있습니다. 예를 들어 Camel에 이름을 설정하고 스트림 캐싱을 켜려면 다음을 추가합니다.
camel.springboot.name = MyCamel camel.springboot.stream-caching-enabled=true
camel.springboot.name = MyCamel
camel.springboot.stream-caching-enabled=true