275.4. 경로 및 uriTemplate 구문

path 및 uriTemplate 옵션은 매개 변수 지원을 사용하여 REST 컨텍스트 경로를 정의하는 REST 구문을 사용하여 정의합니다. 

TIP: uriTemplate이 구성되지 않은 경우 path 옵션은 동일한 방식으로 작동합니다. 경로만 구성하거나 두 옵션을 모두 구성하는 경우에는 중요하지 않습니다. 경로 및 uriTemplate을 구성하는 것은 REST를 사용하여 보다 일반적인 방법입니다.

다음은 경로를 사용하는 Camel 경로입니다.

from("rest:get:hello")
  .transform().constant("Bye World");

다음 경로는 "me" 키를 사용하여 Camel 헤더에 매핑되는 매개변수를 사용합니다.

from("rest:get:hello/{me}")
  .transform().simple("Bye ${header.me}");

다음 예제는 기본 경로를 "hello"로 구성한 다음 uriTemplates를 사용하여 두 개의 REST 서비스를 구성했습니다.

from("rest:get:hello:/{me}")
  .transform().simple("Hi ${header.me}");

from("rest:get:hello:/french/{me}")
  .transform().simple("Bonjour ${header.me}");