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 2022/02/15 17:42:38 UTC

[camel-examples] branch main updated: Polish example

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

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


The following commit(s) were added to refs/heads/main by this push:
     new c9d2075  Polish example
c9d2075 is described below

commit c9d2075c70f5489b769ed5259fc5628bdac7fbc1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Feb 15 18:42:29 2022 +0100

    Polish example
---
 examples/jbang/Hey.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/examples/jbang/Hey.java b/examples/jbang/Hey.java
index d3277bc..d8ab5b8 100755
--- a/examples/jbang/Hey.java
+++ b/examples/jbang/Hey.java
@@ -1,11 +1,12 @@
-import org.apache.camel.builder.RouteBuilder;
+// use modeline to configure properties directly in the same source file
+// camel-k: language=java name=Cool property=period=1000
 
-public class Hey extends RouteBuilder {
+public class Hey extends org.apache.camel.builder.RouteBuilder {
 
   @Override
   public void configure() throws Exception {
       // Write your routes here, for example:
-      from("timer:java?period=1000")
+      from("timer:java?period={{period}}")
         .routeId("java")
         .process(e -> {
            e.getMessage().setBody("Hello from Camel");