298.8.5. 경로 구성
web.xml 파일에서 사용할 경로를 구성해야 합니다. 모든 매개변수 앞에 "routeBuilder"를 추가해야 하지만 여러 가지 방법으로 이 작업을 수행할 수 있습니다.
298.8.5.1. RouteBuilder 클래스 사용 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
기본적으로 Camel은 다음과 같이 Camel RouteBuilder 클래스의 FQN 클래스 이름인 param-value라고 가정합니다.
<context-param> <param-name>routeBuilder-MyRoute</param-name> <param-value>org.apache.camel.component.servletlistener.MyRoute</param-value> </context-param>
<context-param>
<param-name>routeBuilder-MyRoute</param-name>
<param-value>org.apache.camel.component.servletlistener.MyRoute</param-value>
</context-param>
다음과 같이 동일한 param-value에 여러 클래스를 지정할 수 있습니다.
매개 변수의 이름에는 런타임에 의미가 없습니다. 이는 고유하고 "routeBuilder"로 시작해야합니다. 위의 예제에서는 "routeBuilder-routes"가 있습니다. 하지만 "routeBuilder.foo"라는 이름을 지정할 수 있습니다.