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 97e90f9 CAMEL-15413: RouteBuilderConfigurer - Rename to
LambdaRouteBuilder
97e90f9 is described below
commit 97e90f925296e271bc8b90cd363df6198cbd0f39
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Aug 26 10:36:03 2020 +0200
CAMEL-15413: RouteBuilderConfigurer - Rename to LambdaRouteBuilder
---
examples/camel-example-main-lambda/readme.adoc | 9 ++++-----
.../src/main/java/org/apache/camel/example/MyConfiguration.java | 7 +++----
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/examples/camel-example-main-lambda/readme.adoc
b/examples/camel-example-main-lambda/readme.adoc
index e55faea..67ae35e 100644
--- a/examples/camel-example-main-lambda/readme.adoc
+++ b/examples/camel-example-main-lambda/readme.adoc
@@ -1,16 +1,15 @@
== Camel Example Main Lambda
-This example demonstrates how to use `RouteBuilderConfigurer` as a way of
defining Camel routes
+This example demonstrates how to use `LambdaRouteBuilder` as a way of defining
Camel routes
using lambda style.
rb -> rb.from("timer:foo").log("Hello Lambda");
-The `RouteBuilderConfigurer` is a functional interface that makes defining
routes with lambda style
-easy. All you need to do is to create a method that returns
`RouteBuilderConfigurer` and mark
+The `LambdaRouteBuilder` is a functional interface that makes defining routes
with lambda style
+easy. All you need to do is to create a method that returns
`LambdaRouteBuilder` and mark
the method with `@BindToRegistry` or if using Spring Boot `@Bean` or
`@Produce` for CDI/Quarkus.
-See the `MyConfiguration.java` in this example how this class is the
configuration class and where
-routes are defined.
+See the `MyConfiguration.java` for the configuration and Camel routes are
setup.
Multiple routes can be defined by having multiple methods.
diff --git
a/examples/camel-example-main-lambda/src/main/java/org/apache/camel/example/MyConfiguration.java
b/examples/camel-example-main-lambda/src/main/java/org/apache/camel/example/MyConfiguration.java
index 32a8b14..14fd61b 100644
---
a/examples/camel-example-main-lambda/src/main/java/org/apache/camel/example/MyConfiguration.java
+++
b/examples/camel-example-main-lambda/src/main/java/org/apache/camel/example/MyConfiguration.java
@@ -18,8 +18,7 @@ package org.apache.camel.example;
import org.apache.camel.BindToRegistry;
import org.apache.camel.PropertyInject;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.builder.RouteBuilderConfigurer;
+import org.apache.camel.builder.LambdaRouteBuilder;
/**
* Class to configure the Camel application.
@@ -33,11 +32,11 @@ public class MyConfiguration {
}
/**
- * Here we define a route as a method that returns a
RouteBuilderConfigurer instance.
+ * Here we define a route as a method that returns a LambdaRouteBuilder
instance.
* This allows us to use lambda style.
*/
@BindToRegistry
- public RouteBuilderConfigurer myRoute() {
+ public LambdaRouteBuilder myRoute() {
return rb -> rb.from("quartz:foo?cron={{myCron}}")
.bean("myBean", "hello")
.log("${body}")