This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit bfed463d4ec831929c5a5f8893f2e57301a3670b Author: Luca Burgazzoli <lburgazz...@users.noreply.github.com> AuthorDate: Fri Jun 19 14:54:13 2020 +0200 Revisit camel-quarkus bootstrap #1128 (docs) Co-authored-by: Peter Palaga <ppal...@redhat.com> --- docs/modules/ROOT/pages/user-guide/bootstrap.adoc | 13 +++++++++---- .../src/main/java/org/acme/timer/TimerRoute.java | 2 +- examples/timer-log-main/README.adoc | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/modules/ROOT/pages/user-guide/bootstrap.adoc b/docs/modules/ROOT/pages/user-guide/bootstrap.adoc index db5671e..95caa16 100644 --- a/docs/modules/ROOT/pages/user-guide/bootstrap.adoc +++ b/docs/modules/ROOT/pages/user-guide/bootstrap.adoc @@ -1,14 +1,19 @@ = Bootstrap Camel Quarkus -:page-aliases: bootstrap.adoc -Camel Quarkus automatically configure and deploy a Camel Context bean which by default is started/stopped according to the Quarkus Application lifecycle. The configuration step happens at build time during Quarkus' augmentation phase and it is driven by the Camel Quarkus extensions which can be tuned using Camel Quarkus specific properties indentified by "camel.quarkus" as prefix. After the configuration is done, a minimal Camel Runtime is assembled and started at RUNTIME_INIT time. At t [...] +Camel Quarkus automatically configures and deploys a Camel Context bean which by default is started/stopped according to the Quarkus Application lifecycle. The configuration step happens at build time during Quarkus' augmentation phase and it is driven by the Camel Quarkus extensions which can be tuned using Camel Quarkus specific `camel.quarkus.*` properties. After the configuration is done, a minimal Camel Runtime is assembled and started at `RUNTIME_INIT` time. At that point, any addi [...] [source,java] ---- +import javax.enterprise.context.ApplicationScoped; +import javax.inject.Named; + +import org.apache.camel.component.log.LogComponent; +import org.apache.camel.support.processor.DefaultExchangeFormatter; + @ApplicationScoped public class Configurations { /** - * Produces a {@link LogComponent} instance with a custom exchange formatter. + * Produces a {@link LogComponent} instance with a custom exchange formatter set-up. */ @Named LogComponent log() { @@ -24,7 +29,7 @@ public class Configurations { } ---- -To configure component and other aspects of Apache Camel through properties, you can add the camel-core-main extension which brings functionnalities from https://camel.apache.org/components/latest/others/main.html[Apache Camel Main] to Camel Quarkus. By adding such extension the programmatic configuration of the Log Component done above, can be done through properties: +To configure component and other aspects of Apache Camel through properties, you can add the `camel-core-main` extension which brings functionalities from https://camel.apache.org/components/latest/others/main.html[Apache Camel Main] to Camel Quarkus. By adding such extension the programmatic configuration of the Log Component done above, can be done through properties: [source,properties] diff --git a/examples/timer-log-cdi/src/main/java/org/acme/timer/TimerRoute.java b/examples/timer-log-cdi/src/main/java/org/acme/timer/TimerRoute.java index 10ef1a0..f5c5010 100644 --- a/examples/timer-log-cdi/src/main/java/org/acme/timer/TimerRoute.java +++ b/examples/timer-log-cdi/src/main/java/org/acme/timer/TimerRoute.java @@ -47,7 +47,7 @@ public class TimerRoute extends RouteBuilder { public void configure() throws Exception { fromF("timer:foo?period=%s", period) .setBody(exchange -> "Incremented the counter: " + counter.increment()) - // the configuration of the log component is programmatically done using CDI + // the configuration of the log component is done programmatically using CDI // by the org.acme.timer.Beans::log method. .to("log:example"); } diff --git a/examples/timer-log-main/README.adoc b/examples/timer-log-main/README.adoc index 1a25c86..283ff43 100644 --- a/examples/timer-log-main/README.adoc +++ b/examples/timer-log-main/README.adoc @@ -1,6 +1,6 @@ = timer-log -This is a basic hello world example that uses a cusomt main to set-up +This is a basic hello world example that uses a custom main to set-up a Camel timer that triggers every second and prints to the log. TIP: Check the https://camel.apache.org/camel-quarkus/latest/first-steps.html[Camel Quarkus User guide] for prerequisites