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 3f75df3 CAMEL-17575: main examples - even easier
3f75df3 is described below
commit 3f75df354b28aadb5adfeee58adada03b3bebf69
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Feb 5 14:53:47 2022 +0100
CAMEL-17575: main examples - even easier
---
.../src/main/java/org/apache/camel/example/MyApplication.java | 6 +-----
examples/kamelet/src/main/resources/application.properties | 4 ++--
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git
a/examples/kamelet/src/main/java/org/apache/camel/example/MyApplication.java
b/examples/kamelet/src/main/java/org/apache/camel/example/MyApplication.java
index e2799a0..fd50400 100644
--- a/examples/kamelet/src/main/java/org/apache/camel/example/MyApplication.java
+++ b/examples/kamelet/src/main/java/org/apache/camel/example/MyApplication.java
@@ -28,11 +28,7 @@ public final class MyApplication {
public static void main(String[] args) throws Exception {
// use Camels Main class
- Main main = new Main();
- // and add route templates via routes builder
- main.configure().addRoutesBuilder(MyRouteTemplates.class);
- // and add routes that will consume templates through kamelets
- main.configure().addRoutesBuilder(MyRoutes.class);
+ Main main = new Main(MyApplication.class);
// now keep the application running until the JVM is terminated (ctrl
+ c or sigterm)
main.run(args);
diff --git a/examples/kamelet/src/main/resources/application.properties
b/examples/kamelet/src/main/resources/application.properties
index 7b15eec..8a4a59b 100644
--- a/examples/kamelet/src/main/resources/application.properties
+++ b/examples/kamelet/src/main/resources/application.properties
@@ -15,8 +15,8 @@
## limitations under the License.
## ---------------------------------------------------------------------------
-# to configure camel main
-# here you can configure options on camel main (see
MainConfigurationProperties class)
+# here you can configure options on camel main
+# https://camel.apache.org/components/next/others/main.html
camel.main.name = MyCoolCamel
# turn on lightweight mode