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-spring-boot-examples.git
The following commit(s) were added to refs/heads/main by this push:
new 6444041 Polished
6444041 is described below
commit 6444041485bc6e22029f65a6e0676f0ee6c8b9d5
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Sep 6 19:39:01 2022 +0200
Polished
---
spring-boot-cli/hello.groovy | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/spring-boot-cli/hello.groovy b/spring-boot-cli/hello.groovy
index 64831e3..e302a4e 100644
--- a/spring-boot-cli/hello.groovy
+++ b/spring-boot-cli/hello.groovy
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
@Grab("org.apache.camel:camel-core:3.18.0")
import org.apache.camel.builder.RouteBuilder;
@@ -8,23 +24,23 @@ import org.apache.camel.impl.DefaultCamelContext;
class CamelRunner {
RouteBuilder hello() {
- return new RouteBuilder() {
+ return new RouteBuilder() {
public void configure() {
from("timer:simple?period=1000")
- .log("Hello Cameleers")
+ .log("Hello Cameleers")
}
}
}
-
+
@Bean
- public CommandLineRunner runner() {
- return (args) -> {
+ public CommandLineRunner runner() {
+ return (args) -> {
try (CamelContext camelContext = new DefaultCamelContext()) {
camelContext.addRoutes(hello());
camelContext.start();
Thread.sleep(10000);
}
- };
- }
+ };
+ }
}
\ No newline at end of file