You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2019/10/23 14:36:19 UTC

[camel-k] branch master updated: chore: fix eaxmples

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

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


The following commit(s) were added to refs/heads/master by this push:
     new cbf619b  chore: fix eaxmples
cbf619b is described below

commit cbf619ba47dba2e7f4327c901810bfb7e6c4598a
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Tue Oct 22 22:54:15 2019 +0200

    chore: fix eaxmples
---
 examples/camel-caffeine.groovy |  6 ++----
 examples/knative/README.adoc   |  4 ++--
 examples/routes.groovy         | 19 +++++++++----------
 3 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/examples/camel-caffeine.groovy b/examples/camel-caffeine.groovy
index 8422a5d..fb09740 100644
--- a/examples/camel-caffeine.groovy
+++ b/examples/camel-caffeine.groovy
@@ -24,10 +24,8 @@
 
 import com.github.benmanes.caffeine.cache.Caffeine
 
-context {
-    registry {
-        caffeineCache = Caffeine.newBuilder().recordStats().build()
-    }
+beans {
+    caffeineCache = Caffeine.newBuilder().recordStats().build()
 }
 
 from('timer:tick')
diff --git a/examples/knative/README.adoc b/examples/knative/README.adoc
index e392d6b..b39524c 100644
--- a/examples/knative/README.adoc
+++ b/examples/knative/README.adoc
@@ -121,7 +121,7 @@ from('knative:channel/words')
   .to('slack:#camel-k-tests')
 
 
-context {
+camel {
   components {
     slack {
       webhookUrl '<put-here-your-slack-incoming-webhook-url>'
@@ -133,4 +133,4 @@ context {
 Now the single words will be printed in the log but also forwarded to the
 slack channel named `#camel-k-tests`.
 
-You have infinite possibilities with Camel!
\ No newline at end of file
+You have infinite possibilities with Camel!
diff --git a/examples/routes.groovy b/examples/routes.groovy
index 62e61e7..741df70 100644
--- a/examples/routes.groovy
+++ b/examples/routes.groovy
@@ -24,7 +24,7 @@ import java.util.concurrent.ThreadLocalRandom
 //     kamel run examples/routes.groovy
 //
 
-context {
+camel {
 
     //
     // configure components
@@ -36,21 +36,20 @@ context {
             }
         }
     }
+}
 
-    //
-    // configure registry
-    //
-    registry {
-        myProcessor = processor {
-            it.in.headers['RandomValue'] = ThreadLocalRandom.current().nextInt()
-        }
+//
+// configure beans
+//
+beans {
+    myProcessor = processor {
+        it.in.headers['RandomValue'] = ThreadLocalRandom.current().nextInt()
     }
 }
 
-
 from('timer:groovy?period=1s')
     .routeId('groovy')
     .setBody()
         .constant('Hello Camel K!')
     .process('myProcessor')
-    .to('log:info')
\ No newline at end of file
+    .to('log:info')