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/02/04 06:30:32 UTC

[camel-spring-boot] branch master updated: Polished

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/master by this push:
     new ef4d22f  Polished
ef4d22f is described below

commit ef4d22f50287c3d7edd66e7aa177ad51c97d4106
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 4 07:29:15 2021 +0100

    Polished
---
 .../src/main/docs/spring-boot.adoc                 | 10 ++---
 .../spring/boot/CamelConfigurationProperties.java  | 52 ++++++++++++++--------
 2 files changed, 39 insertions(+), 23 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 375e2d9..b464e74 100644
--- a/core/camel-spring-boot/src/main/docs/spring-boot.adoc
+++ b/core/camel-spring-boot/src/main/docs/spring-boot.adoc
@@ -165,8 +165,8 @@ The component supports 165 options, which are listed below.
 | *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.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 component scanning of RouteBuilder classes with @Component annotation. 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: &#42;&#42;/Bar&#42; To exclude all routes form a specific package use: com/mycompany/bar/&#42; To exclude all routes [...]
-| *camel.springboot.java-routes-include-pattern* | Used for inclusive filtering component scanning of RouteBuilder classes with @Component annotation. 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 include all classes starting with Foo use: &#42;&#42;/Foo* To include all routes form a specific package use: com/mycompany/foo/&#42; To include all routes for [...]
+| *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: &#42;&#42;/Bar&#42; To exclude all routes form a specific package use: com/mycompany/bar/&#42; To exc [...]
+| *camel.springboot.java-routes-include-pattern* | Used for inclusive 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. Multiple patterns can be specified separated by comma. For example to include all classes starting with Foo use: &#42;&#42;/Foo* To include all routes form a s [...]
 | *camel.springboot.jmx-enabled* | Enable JMX in your Camel application. | true | Boolean
 | *camel.springboot.jmx-management-name-pattern* | The naming pattern for creating the CamelContext JMX management name. The default pattern is #name# | #name# | String
 | *camel.springboot.jmx-management-statistics-level* | Sets the JMX statistics level The level can be set to Extended to gather additional information The default value is Default. |  | ManagementStatisticsLevel
@@ -193,9 +193,9 @@ The component supports 165 options, which are listed below.
 | *camel.springboot.route-controller-unhealthy-on-exhausted* | Whether to mark the route as unhealthy (down) when all restarting attempts (backoff) have failed and the route is not successfully started and the route manager is giving up. Setting this to true allows health checks to know about this and can report the Camel application as DOWN. The default is false. | false | Boolean
 | *camel.springboot.route-filter-exclude-pattern* | Used for filtering routes routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression. For example to only include routes which starts with foo in their route id's, use: include=foo&#42; And to exclude routes which starts from JMS endpoints, use: exclude=jms:&#42; Multiple patterns can be separated by c [...]
 | *camel.springboot.route-filter-include-pattern* | Used for filtering routes matching the given pattern, which follows the following rules: - Match by route id - Match by route input endpoint uri The matching is using exact match, by wildcard and regular expression. For example to only include routes which starts with foo in their route id's, use: include=foo&#42; And to exclude routes which starts from JMS endpoints, use: exclude=jms:&#42; Multiple patterns can be separated by comma, f [...]
-| *camel.springboot.routes-collector-enabled* | Whether the routes collector is enabled or not. When enabled Camel will auto-discover routes (RouteBuilder instances from the registry and also load additional XML routes from the file system. The routes collector is default enabled. | true | Boolean
-| *camel.springboot.routes-exclude-pattern* |  |  | String
-| *camel.springboot.routes-include-pattern* |  |  | String
+| *camel.springboot.routes-collector-enabled* | Whether the routes collector is enabled or not. When enabled Camel will auto-discover routes (RouteBuilder instances from the registry and also load additional routes from the file system). The routes collector is default enabled. | true | Boolean
+| *camel.springboot.routes-exclude-pattern* | Used for exclusive filtering of routes from directories. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma, as example, to exclude all the routes from a directory whose name contains foo use: &#42;&#42;/*foo*. |  | String
+| *camel.springboot.routes-include-pattern* | Used for inclusive filtering of routes from directories. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma, as example, to include all the routes from a directory whose name contains foo use: &#42;&#42;/*foo*. | classpath:camel/*.xml,classpath:camel-template/*.xml,classpath:camel-rest/*.xml | String
 | *camel.springboot.shutdown-log-inflight-exchanges-on-timeout* | Sets whether to log information about the inflight Exchanges which are still running during a shutdown which didn't complete without the given timeout. This requires to enable the option inflightRepositoryExchangeEnabled. | true | Boolean
 | *camel.springboot.shutdown-now-on-timeout* | Sets whether to force shutdown of all consumers when a timeout occurred and thus not all consumers was shutdown within that period. You should have good reasons to set this option to false as it means that the routes keep running and is halted abruptly when CamelContext has been shutdown. | true | Boolean
 | *camel.springboot.shutdown-routes-in-reverse-order* | Sets whether routes should be shutdown in reverse or the same order as they where started. | true | Boolean
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 4dcdee3..0eba5f4 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
@@ -495,36 +495,52 @@ public class CamelConfigurationProperties extends DefaultConfigurationProperties
     /**
      * Whether the routes collector is enabled or not.
      *
-     * When enabled Camel will auto-discover routes (RouteBuilder instances from the registry and
-     * also load additional XML routes from the file system.
+     * When enabled Camel will auto-discover routes (RouteBuilder instances from the registry and also load additional
+     * routes from the file system).
      *
      * The routes collector is default enabled.
      */
     private boolean routesCollectorEnabled = true;
 
     /**
-     * Used for inclusive filtering component scanning of RouteBuilder classes with @Component annotation.
-     * The exclusive filtering takes precedence over inclusive filtering.
-     * The pattern is using Ant-path style pattern.
+     * Used for inclusive filtering of routes from directories. 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 include all classes starting with Foo use: &#42;&#42;/Foo*
-     * To include all routes form a specific package use: com/mycompany/foo/&#42;
-     * To include all routes form a specific package and its sub-packages use double wildcards: com/mycompany/foo/&#42;&#42;
-     * And to include all routes from two specific packages use: com/mycompany/foo/&#42;,com/mycompany/stuff/&#42;
+     * Multiple patterns can be specified separated by comma, as example, to include all the routes from a directory
+     * whose name contains foo use: &#42;&#42;/*foo*.
+     */
+    private String routesIncludePattern = "classpath:camel/*.xml,classpath:camel-template/*.xml,classpath:camel-rest/*.xml";
+
+    /**
+     * Used for exclusive filtering of routes from directories. The exclusive filtering takes precedence over inclusive
+     * filtering. The pattern is using Ant-path style pattern.
+     *
+     * Multiple patterns can be specified separated by comma, as example, to exclude all the routes from a directory
+     * whose name contains foo use: &#42;&#42;/*foo*.
+     */
+    private String routesExcludePattern;
+
+    /**
+     * Used for inclusive 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.
+     *
+     * Multiple patterns can be specified separated by comma. For example to include all classes starting with Foo use:
+     * &#42;&#42;/Foo* To include all routes form a specific package use: com/mycompany/foo/&#42; To include all routes
+     * form a specific package and its sub-packages use double wildcards: com/mycompany/foo/&#42;&#42; And to include
+     * all routes from two specific packages use: com/mycompany/foo/&#42;,com/mycompany/stuff/&#42;
      */
     private String javaRoutesIncludePattern;
 
     /**
-     * Used for exclusive filtering component scanning of RouteBuilder classes with @Component annotation.
-     * The exclusive filtering takes precedence over inclusive filtering.
-     * The pattern is using Ant-path style pattern.
-     * Multiple patterns can be specified separated by comma.
+     * 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: &#42;&#42;/Bar&#42;
-     * To exclude all routes form a specific package use: com/mycompany/bar/&#42;
-     * To exclude all routes form a specific package and its sub-packages use double wildcards: com/mycompany/bar/&#42;&#42;
-     * And to exclude all routes from two specific packages use: com/mycompany/bar/&#42;,com/mycompany/stuff/&#42;
+     * For example to exclude all classes starting with Bar use: &#42;&#42;/Bar&#42; To exclude all routes form a
+     * specific package use: com/mycompany/bar/&#42; To exclude all routes form a specific package and its sub-packages
+     * use double wildcards: com/mycompany/bar/&#42;&#42; And to exclude all routes from two specific packages use:
+     * com/mycompany/bar/&#42;,com/mycompany/stuff/&#42;
      */
     private String javaRoutesExcludePattern;