CAMEL-15926: updated route template example
diff --git a/examples/camel-example-routetemplate/src/main/java/org/apache/camel/example/MyApplication.java b/examples/camel-example-routetemplate/src/main/java/org/apache/camel/example/MyApplication.java
index 6b9e4f4..2d46da6 100644
--- a/examples/camel-example-routetemplate/src/main/java/org/apache/camel/example/MyApplication.java
+++ b/examples/camel-example-routetemplate/src/main/java/org/apache/camel/example/MyApplication.java
@@ -33,14 +33,14 @@
main.configure().addRoutesBuilder(MyRouteTemplates.class);
// add configuration class which setup the routes from the route templates
- // to configure route templates we can use java code as below from a configuration class,
+ // to configure route templates we can use java code as below from a template builder class,
// gives more power as its java code.
// or we can configure as well from application.properties,
// less power as its key value pair properties
// and you can also use both java and properties together
// in this example we use properties by default and have disabled java
- // main.configure().addConfigurationClass(MyConfiguration.class);
+ // main.bind("myTemplateBuilder", new MyTemplateBuilder());
// now keep the application running until the JVM is terminated (ctrl + c or sigterm)
main.run(args);
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/MyTemplateBuilder.java
similarity index 90%
rename from examples/camel-example-routetemplate/src/main/java/org/apache/camel/example/MyConfiguration.java
rename to examples/camel-example-routetemplate/src/main/java/org/apache/camel/example/MyTemplateBuilder.java
index ac23bc0..a9fbceb 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/MyTemplateBuilder.java
@@ -18,8 +18,9 @@
import org.apache.camel.CamelContext;
import org.apache.camel.builder.TemplatedRouteBuilder;
+import org.apache.camel.main.ConfigureRouteTemplates;
-public class MyConfiguration {
+public class MyTemplateBuilder implements ConfigureRouteTemplates {
/**
* Configure and adds routes from route templates.
@@ -28,7 +29,7 @@
* and invoked after routes and route templates has been loaded which allows
* to create and add routes from the route templates during bootstrap
*/
- public void configureRouteTemplates(CamelContext context) {
+ public void configure(CamelContext context) {
// create two routes from the template