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 780e2c353843fad2eeda02235f407a03fb2ab570 Author: Claus Ibsen <[email protected]> AuthorDate: Thu Jun 10 13:25:27 2021 +0200 CAMEL-16700: main: allow to configure global options through properties --- core/camel-spring-boot/src/main/docs/spring-boot.adoc | 3 ++- .../apache/camel/spring/boot/CamelConfigurationProperties.java | 10 ++++++++++ docs/modules/ROOT/pages/spring-boot.adoc | 3 ++- 3 files changed, 14 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 e25b761..dbf7d70 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 172 options, which are listed below. +The component supports 173 options, which are listed below. @@ -169,6 +169,7 @@ The component supports 172 options, which are listed below. | *camel.springboot.exchange-factory-capacity* | The capacity the pool (for each consumer) uses for storing exchanges. The default capacity is 100. | 100 | Integer | *camel.springboot.exchange-factory-statistics-enabled* | Configures whether statistics is enabled on exchange factory. | false | Boolean | *camel.springboot.file-configurations* | Directory to load additional configuration files that contains configuration values that takes precedence over any other configuration. This can be used to refer to files that may have secret configuration that has been mounted on the file system for containers. You must use either file: or classpath: as prefix to load from file system or classpath. Then you can specify a pattern to load from sub directories and a name pattern such as file:/var/ [...] +| *camel.springboot.global-options* | Sets global options that can be referenced in the camel context Important: This has nothing to do with property placeholders, and is just a plain set of key/value pairs which are used to configure global options on CamelContext, such as a maximum debug logging length etc. | | Map | *camel.springboot.include-non-singletons* | Whether to include non-singleton beans (prototypes) when scanning for RouteBuilder instances. By default only singleton beans is included in the context scan. | false | Boolean | *camel.springboot.inflight-repository-browse-enabled* | Sets whether the inflight repository should allow browsing each inflight exchange. This is by default disabled as there is a very slight performance overhead when enabled. | false | Boolean | *camel.springboot.java-routes-exclude-pattern* | Used for exclusive filtering RouteBuilder classes which are collected from the registry or via classpath scanning. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to exclude all classes starting with Bar use: **/Bar* To exclude all routes form a specific package use: com/mycompany/bar/* To exc [...] 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 2bddab9..f3fa553 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 @@ -22,6 +22,8 @@ import org.apache.camel.StartupSummaryLevel; import org.apache.camel.main.DefaultConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties; +import java.util.Map; + @ConfigurationProperties(prefix = "camel.springboot") public class CamelConfigurationProperties extends DefaultConfigurationProperties<CamelConfigurationProperties> { @@ -465,6 +467,14 @@ public class CamelConfigurationProperties extends DefaultConfigurationProperties private boolean dumpRoutes; /** + * Sets global options that can be referenced in the camel context + * + * Important: This has nothing to do with property placeholders, and is just a plain set of key/value pairs + * which are used to configure global options on CamelContext, such as a maximum debug logging length etc. + */ + private Map<String, String> globalOptions; + + /** * 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 e25b761..8f130bb 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 172 options, which are listed below. +The component supports 173 options, which are listed below. @@ -169,6 +169,7 @@ The component supports 172 options, which are listed below. | *camel.springboot.exchange-factory-capacity* | The capacity the pool (for each consumer) uses for storing exchanges. The default capacity is 100. | 100 | Integer | *camel.springboot.exchange-factory-statistics-enabled* | Configures whether statistics is enabled on exchange factory. | false | Boolean | *camel.springboot.file-configurations* | Directory to load additional configuration files that contains configuration values that takes precedence over any other configuration. This can be used to refer to files that may have secret configuration that has been mounted on the file system for containers. You must use either file: or classpath: as prefix to load from file system or classpath. Then you can specify a pattern to load from sub directories and a name pattern such as file:/var/ [...] +| *camel.springboot.global-options* | | | Map | *camel.springboot.include-non-singletons* | Whether to include non-singleton beans (prototypes) when scanning for RouteBuilder instances. By default only singleton beans is included in the context scan. | false | Boolean | *camel.springboot.inflight-repository-browse-enabled* | Sets whether the inflight repository should allow browsing each inflight exchange. This is by default disabled as there is a very slight performance overhead when enabled. | false | Boolean | *camel.springboot.java-routes-exclude-pattern* | Used for exclusive filtering RouteBuilder classes which are collected from the registry or via classpath scanning. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to exclude all classes starting with Bar use: **/Bar* To exclude all routes form a specific package use: com/mycompany/bar/* To exc [...]
