...
The Spark-rest component allows to define REST endpoints using the Spark REST Java library (not to be mistaken with Apache Spark) using the Rest DSL.
Info |
---|
This component integrates with Spark REST Java library which is a REST library. This is not related to Apache Spark which is a project about big data. Apache Camel also provides a Camel component (camel-spark) for integrating Camel with Apache Spark. |
Info |
---|
Spark REST Java Library requires Java 8 runtime. |
Maven users will need to add the following dependency to their pom.xml for this component:
...
Code Block |
---|
from("spark-rest:get:/hello/*/to/*") .transform().simple("Bye big ${header.splat[1]} from ${header.splat[0]}"); |
Rest DSL
Apache Camel provides a new Rest DSL that allow to define the REST services in a nice REST style. For example we can define a REST hello service in Java DSL as shown below:
Tabs Container | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
|
...
|
See more details at the Rest DSL.
...