...
Code Block |
---|
|
<routes xmlns="http://camel.apache.org/schema/spring">
<route id="test">
<from uri="timer://trigger"/>
<transform>
<simple>ref:myBean</simple>
</transform>
<to uri="log:out"/>
</route>
</routes> |
Adding rest-dsl
Available since Camel 2.18
By default you can put Camel Rest-DSL XML routes in the classpath under the directory camel-rest, which camel-spring-boot will auto detect and include.
You can configure the directory name or turn this off using the configuration option
Code Block |
---|
// turn off
camel.springboot.xmlRests = false
// scan in the com/foo/routes classpath
camel.springboot.xmlRests = classpath:com/foo/rests/*.xml |
The Rest-DSL XML files should be Camel XML rests (not CamelContext) such as
Code Block |
---|
|
<rests xmlns="http://camel.apache.org/schema/spring">
<rest>
<post uri="/persons">
<to uri="direct:postPersons"/>
</post>
<get uri="/persons">
<to uri="direct:getPersons"/>
</get>
<get uri="/persons/{personId}">
<to uri="direct:getPersionId"/>
</get>
<put uri="/persons/{personId}">
<to uri="direct:putPersionId"/>
</put>
<delete uri="/persons/{personId}">
<to uri="direct:deletePersionId"/>
</delete>
</rest>
</rests> |
Include Page |
---|
| Endpoint See Also |
---|
| Endpoint See Also |
---|
|