This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-3.14.x in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.14.x by this push: new 702c912 Update route-template.adoc (#6851) 702c912 is described below commit 702c9129470a6b199196b4f5a483463f9ee477de Author: Chirag <csangh...@manh.com> AuthorDate: Sat Jan 29 03:01:09 2022 -0500 Update route-template.adoc (#6851) Clarifying that using with camelContext is Spring XML vs using routeTemplates is with XML DSL. --- .../modules/ROOT/pages/route-template.adoc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/user-manual/modules/ROOT/pages/route-template.adoc b/docs/user-manual/modules/ROOT/pages/route-template.adoc index 2a73074..0b37d62 100644 --- a/docs/user-manual/modules/ROOT/pages/route-template.adoc +++ b/docs/user-manual/modules/ROOT/pages/route-template.adoc @@ -34,7 +34,7 @@ public class MyRouteTemplates extends RouteBuilder { } ---- -And in XML DSL +And in Spring XML DSL [source,xml] ---- @@ -52,6 +52,24 @@ And in XML DSL </camelContext> ---- +And in XML DSL + +[source,xml] +---- +<routeTemplates xmlns="http://camel.apache.org/schema/spring"> + <routeTemplate id="myTemplate"> + <templateParameter name="name"/> + <templateParameter name="greeting"/> + <templateParameter name="myPeriod" defaultValue="3s"/> + <route> + <from uri="timer:{{name}}?period={{myPeriod}}"/> + <setBody><simple>{{greeting}} ${body}</simple></setBody> + <log message="${body}"/> + </route> + </routeTemplate> +</routeTemplates> +---- + In the examples above there was one route template, but you can define as many as you want. Each template must have an unique id. The template parameters are used for defining the parameters the template accepts. As you can see there are 3 parameters: name, greeting, and myPeriod. The first two