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/06/22 12:48:29 UTC
[camel-spring-boot-examples] branch main updated: CAMEL-18149: camel-spring-boot - Add camel developer console as actuator that can be enabled.
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 f093596 CAMEL-18149: camel-spring-boot - Add camel developer console as actuator that can be enabled.
f093596 is described below
commit f0935967ca344678cc31258574a77cb9727c375b
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jun 22 14:48:21 2022 +0200
CAMEL-18149: camel-spring-boot - Add camel developer console as actuator that can be enabled.
---
spring-boot/pom.xml | 16 ++++++++++------
spring-boot/readme.adoc | 16 +++++++++++-----
.../src/main/java/sample/camel/MyCamelRouter.java | 2 +-
spring-boot/src/main/resources/application.properties | 12 +-----------
4 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/spring-boot/pom.xml b/spring-boot/pom.xml
index cc8fc4a..5dc19ba 100644
--- a/spring-boot/pom.xml
+++ b/spring-boot/pom.xml
@@ -90,6 +90,16 @@
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-stream-starter</artifactId>
</dependency>
+ <!-- include camel developer console -->
+ <dependency>
+ <groupId>org.apache.camel.springboot</groupId>
+ <artifactId>camel-console-starter</artifactId>
+ </dependency>
+ <!-- include JMX that allows additional information in camel developer console -->
+ <dependency>
+ <groupId>org.apache.camel.springboot</groupId>
+ <artifactId>camel-management-starter</artifactId>
+ </dependency>
<!-- test -->
<dependency>
@@ -102,12 +112,6 @@
<artifactId>camel-test-spring-junit5</artifactId>
<scope>test</scope>
</dependency>
- <!-- JMX is needed for route coverage testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-management</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git a/spring-boot/readme.adoc b/spring-boot/readme.adoc
index 6a3cf6f..7a8f41e 100644
--- a/spring-boot/readme.adoc
+++ b/spring-boot/readme.adoc
@@ -37,14 +37,20 @@ curl -XGET -s http://localhost:8080/actuator/info
See the `application.properties` to control what information to present in actuator.
-=== Route coverage
+=== Camel Developer Console
-This example has enabled testing with route coverage, which after running the test dumps a report, if you run:
+This application includes `camel-console-starter` which is a basic developer console
+that is accessible as a Spring Boot actuator endpoint via:
- mvn test camel-report:route-coverage
+----
+curl -XGET -s http://localhost:8080/actuator/camel
+----
+
+For example to get route information:
-See more details about route coverage at:
-https://camel.apache.org/manual/latest/camel-report-maven-plugin.html[camel-report-maven-plugin].
+----
+curl -XGET -s http://localhost:8080/actuator/camel/routes
+----
=== Help and contributions
diff --git a/spring-boot/src/main/java/sample/camel/MyCamelRouter.java b/spring-boot/src/main/java/sample/camel/MyCamelRouter.java
index 8321887..4338ee4 100644
--- a/spring-boot/src/main/java/sample/camel/MyCamelRouter.java
+++ b/spring-boot/src/main/java/sample/camel/MyCamelRouter.java
@@ -23,7 +23,7 @@ import org.springframework.stereotype.Component;
/**
* A simple Camel route that triggers from a timer and calls a bean and prints to system out.
* <p/>
- * Use <tt>@Component</tt> to make Camel auto detect this route when starting.
+ * Use <tt>@Component</tt> to make Camel auto-detect this route when starting.
*/
@Component
public class MyCamelRouter extends RouteBuilder {
diff --git a/spring-boot/src/main/resources/application.properties b/spring-boot/src/main/resources/application.properties
index 4892d7d..d60c4e1 100644
--- a/spring-boot/src/main/resources/application.properties
+++ b/spring-boot/src/main/resources/application.properties
@@ -24,18 +24,8 @@ greeting = Hello World
# how often to trigger the timer (millis)
myPeriod = 2000
-# to watch bean introspection using java reflection usage
-# camel.springboot.bean-introspection-logging-level=INFO
-
-# to automatic shutdown the JVM after a period of time
-#camel.springboot.duration-max-seconds=60
-#camel.springboot.duration-max-messages=100
-
-# add for example: &repeatCount=5 to the timer endpoint to make Camel idle
-#camel.springboot.duration-max-idle-seconds=15
-
# expose actuator endpoint via HTTP
-management.endpoints.web.exposure.include=info,health
+#management.endpoints.web.exposure.include=info,health,camel
# show verbose health details (/actuator/health) so you can see Camel information also
management.endpoint.health.show-details=always