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 2021/04/26 07:58:06 UTC

[camel-spring-boot] 03/03: Dump routes option

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.git

commit 37182173a786ca2b830a80c6a216fe751e4e2564
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Apr 26 09:57:47 2021 +0200

    Dump routes option
---
 core/camel-spring-boot/src/main/docs/spring-boot.adoc         |  3 ++-
 .../camel/spring/boot/CamelConfigurationProperties.java       | 11 +++++++++++
 docs/modules/ROOT/pages/spring-boot.adoc                      |  3 ++-
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.adoc b/core/camel-spring-boot/src/main/docs/spring-boot.adoc
index 73a16e2..ca9ee60 100644
--- a/core/camel-spring-boot/src/main/docs/spring-boot.adoc
+++ b/core/camel-spring-boot/src/main/docs/spring-boot.adoc
@@ -92,7 +92,7 @@ When using spring-boot with Spring Boot make sure to use the following Maven dep
 ----
 
 
-The component supports 171 options, which are listed below.
+The component supports 172 options, which are listed below.
 
 
 
@@ -157,6 +157,7 @@ The component supports 171 options, which are listed below.
 | *camel.springboot.bean-post-processor-enabled* | Can be used to turn off bean post processing. Be careful to turn this off, as this means that beans that use Camel annotations such as org.apache.camel.EndpointInject, org.apache.camel.ProducerTemplate, org.apache.camel.Produce, org.apache.camel.Consume etc will not be injected and in use. Turning this off should only be done if you are sure you do not use any of these Camel features. Not all runtimes allow turning this off (such as came [...]
 | *camel.springboot.case-insensitive-headers* | Whether to use case sensitive or insensitive headers. Important: When using case sensitive (this is set to false). Then the map is case sensitive which means headers such as content-type and Content-Type are two different keys which can be a problem for some protocols such as HTTP based, which rely on case insensitive headers. However case sensitive implementations can yield faster performance. Therefore use case sensitive implementation wi [...]
 | *camel.springboot.consumer-template-cache-size* | Consumer template endpoints cache size. | 1000 | Integer
+| *camel.springboot.dump-routes* | If dumping is enabled then Camel will during startup dump all loaded routes (incl rests and route templates) represented as XML DSL into the log. This is intended for trouble shooting or to assist during development. Sensitive information that may be configured in the route endpoints could potentially be included in the dump output and is therefore not recommended to be used for production usage. This requires to have camel-xml-jaxb on the classpath to  [...]
 | *camel.springboot.duration-max-idle-seconds* | To specify for how long time in seconds Camel can be idle before automatic terminating the JVM. You can use this to run Spring Boot for a short while. | 0 | Integer
 | *camel.springboot.duration-max-messages* | To specify how many messages to process by Camel before automatic terminating the JVM. You can use this to run Spring Boot for a short while. | 0 | Integer
 | *camel.springboot.duration-max-seconds* | To specify for how long time in seconds to keep running the JVM before automatic terminating the JVM. You can use this to run Spring Boot for a short while. | 0 | Integer
diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
index ed7a580..0f19fd6 100644
--- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
@@ -454,6 +454,17 @@ public class CamelConfigurationProperties extends DefaultConfigurationProperties
     private String jmxManagementNamePattern = "#name#";
 
     /**
+     * If dumping is enabled then Camel will during startup dump all loaded routes (incl rests and route templates)
+     * represented as XML DSL into the log. This is intended for trouble shooting or to assist during development.
+     *
+     * Sensitive information that may be configured in the route endpoints could potentially be included in the dump
+     * output and is therefore not recommended to be used for production usage.
+     *
+     * This requires to have camel-xml-jaxb on the classpath to be able to dump the routes as XML.
+     */
+    private boolean dumpRoutes;
+
+    /**
      * To turn on MDC logging
      */
     private boolean useMdcLogging;
diff --git a/docs/modules/ROOT/pages/spring-boot.adoc b/docs/modules/ROOT/pages/spring-boot.adoc
index 73a16e2..ca9ee60 100644
--- a/docs/modules/ROOT/pages/spring-boot.adoc
+++ b/docs/modules/ROOT/pages/spring-boot.adoc
@@ -92,7 +92,7 @@ When using spring-boot with Spring Boot make sure to use the following Maven dep
 ----
 
 
-The component supports 171 options, which are listed below.
+The component supports 172 options, which are listed below.
 
 
 
@@ -157,6 +157,7 @@ The component supports 171 options, which are listed below.
 | *camel.springboot.bean-post-processor-enabled* | Can be used to turn off bean post processing. Be careful to turn this off, as this means that beans that use Camel annotations such as org.apache.camel.EndpointInject, org.apache.camel.ProducerTemplate, org.apache.camel.Produce, org.apache.camel.Consume etc will not be injected and in use. Turning this off should only be done if you are sure you do not use any of these Camel features. Not all runtimes allow turning this off (such as came [...]
 | *camel.springboot.case-insensitive-headers* | Whether to use case sensitive or insensitive headers. Important: When using case sensitive (this is set to false). Then the map is case sensitive which means headers such as content-type and Content-Type are two different keys which can be a problem for some protocols such as HTTP based, which rely on case insensitive headers. However case sensitive implementations can yield faster performance. Therefore use case sensitive implementation wi [...]
 | *camel.springboot.consumer-template-cache-size* | Consumer template endpoints cache size. | 1000 | Integer
+| *camel.springboot.dump-routes* | If dumping is enabled then Camel will during startup dump all loaded routes (incl rests and route templates) represented as XML DSL into the log. This is intended for trouble shooting or to assist during development. Sensitive information that may be configured in the route endpoints could potentially be included in the dump output and is therefore not recommended to be used for production usage. This requires to have camel-xml-jaxb on the classpath to  [...]
 | *camel.springboot.duration-max-idle-seconds* | To specify for how long time in seconds Camel can be idle before automatic terminating the JVM. You can use this to run Spring Boot for a short while. | 0 | Integer
 | *camel.springboot.duration-max-messages* | To specify how many messages to process by Camel before automatic terminating the JVM. You can use this to run Spring Boot for a short while. | 0 | Integer
 | *camel.springboot.duration-max-seconds* | To specify for how long time in seconds to keep running the JVM before automatic terminating the JVM. You can use this to run Spring Boot for a short while. | 0 | Integer