THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Option | Default | Description |
---|---|---|
component | The Camel Rest component to use for the REST transport, such as restlet, spark-rest. If no component has been explicit configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or if a org.apache.camel.spi.RestConsumerFactory is registered in the registry. If either one is found, then that is being used. | |
scheme | http | The scheme to use for exposing the REST service. Usually http or https is supported |
hostname | 0.0.0.0 | The hostname to use for exposing the REST service. |
port | The port number to use for exposing the REST service. | |
propertycomponentProperty | Allows to configure as many additional properties. This is used to configure component specific options such as for Restlet / Spark-Rest etc. | |
endpointProperty | Allows to configure as many additional properties. This is used to configure endpoint specific options for Restlet / Spark-Rest etc. | |
consumerProperty | Allows to configure as many additional properties. This is used to configure consumer specific options for Restlet / Spark-Rest etc. |
For example to configure to use the spark-rest component on port 9091, then we can do as follows
Code Block |
---|
restConfiguration().component("spark-rest").port(9091).propertycomponentProperty("foo", "123"); |
And with XML DSL
Code Block |
---|
<restConfiguration component="spark-rest" port="9091"> <restProperty<componentProperty key="foo" value="123"/> </restConfiguration> |
You can configure properties on three levels.
- component - Is used to set any options on the Component class. You can also configure these directly on the component.
- endpoint - Is used set any option on the endpoint level. Many of the Camel components has many options you can set on endpoint level.
- consumer - Is used to set any option on the consumer level. Some components has consumer options, which you can also configure from endpoint level by prefixing the option with "consumer."
You can set multiple options of the same level, so you can can for example configure 2 component options, and 3 endpoint options etc.
Integration a Camel component with Rest DSL
...