314.4. Camel 메시지에 매핑
Spark Request 오브젝트는 getRequest 메서드를 사용하여 raw Spark 요청에 액세스할 수 있는 org.apache.camel.component.sparkrest.SparkMessage 로 Camel 메시지에 매핑됩니다. 기본적으로 Spark 본문은 Camel 메시지 본문에 매핑되며 모든 HTTP 헤더 / Spark 매개변수는 Camel 메시지 헤더에 매핑됩니다. Spark splat 구문은 키 splat를 사용하여 Camel 메시지 헤더에 매핑되는 Spark splat 구문에 대한 특수 지원이 있습니다.
예를 들어 아래 지정된 경로에서는 헤더로 액세스할 수 있는 컨텍스트 경로에 Spark splat (the asterisk 기호)를 사용하여 응답 메시지를 구성합니다.
from("spark-rest:get:/hello/*/to/*")
.transform().simple("Bye big ${header.splat[1]} from ${header.splat[0]}");