You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/07/31 14:32:58 UTC

[camel-examples] branch master updated: CAMEL-15312: Renamed builder

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-examples.git


The following commit(s) were added to refs/heads/master by this push:
     new 00b4b7e  CAMEL-15312: Renamed builder
00b4b7e is described below

commit 00b4b7e3c9656e9bead4a75781c6e0f81cc0c0b5
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jul 31 16:31:01 2020 +0200

    CAMEL-15312: Renamed builder
---
 .../main/java/org/apache/camel/example/MyConfiguration.java   | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/examples/camel-example-routetemplate/src/main/java/org/apache/camel/example/MyConfiguration.java b/examples/camel-example-routetemplate/src/main/java/org/apache/camel/example/MyConfiguration.java
index a3aa603..ac23bc0 100644
--- a/examples/camel-example-routetemplate/src/main/java/org/apache/camel/example/MyConfiguration.java
+++ b/examples/camel-example-routetemplate/src/main/java/org/apache/camel/example/MyConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.example;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.builder.TemplatedRouteBuilder;
 
 public class MyConfiguration {
 
@@ -28,16 +29,18 @@ public class MyConfiguration {
      * to create and add routes from the route templates during bootstrap
      */
     public void configureRouteTemplates(CamelContext context) {
+
         // create two routes from the template
-        context.addRouteFromTemplate("myTemplate")
+
+        TemplatedRouteBuilder.builder(context, "myTemplate")
             .parameter("name", "one")
             .parameter("greeting", "Hello")
-            .build();
+            .add();
 
-        context.addRouteFromTemplate("myTemplate")
+        TemplatedRouteBuilder.builder(context, "myTemplate")
             .parameter("name", "two")
             .parameter("greeting", "Bonjour")
             .parameter("myPeriod", "5s")
-            .build();
+            .add();
     }
 }