CAMEL-18149: camel-spring-boot - Add camel developer console as actuator that can... main
authorClaus Ibsen <claus.ibsen@gmail.com>
Wed, 22 Jun 2022 12:48:21 +0000 (14:48 +0200)
committerClaus Ibsen <claus.ibsen@gmail.com>
Wed, 22 Jun 2022 12:48:21 +0000 (14:48 +0200)
spring-boot/pom.xml
spring-boot/readme.adoc
spring-boot/src/main/java/sample/camel/MyCamelRouter.java
spring-boot/src/main/resources/application.properties

index cc8fc4a594a1c70e8bcf8e16ad7535af92f58826..5dc19ba9a15d2e12910ff139a5f280ab05768e37 100644 (file)
             <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>
             <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>
index 6a3cf6f37ff4480b5cea3f21d9b86ecb8b06fddd..7a8f41e1722efdcf08d846339255e323742bd5f1 100644 (file)
@@ -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
 
index 8321887e9668c6be48b5655252a608aa0344c8ef..4338ee4d9769a729bed0d63a5f676d71dcc7ac2d 100644 (file)
@@ -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 {
index 4892d7d384e6aef563bf21e36477e59c574a0646..d60c4e1c0a54c86b4e297a0d3098e6f11a2c9fdd 100644 (file)
@@ -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