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.git
The following commit(s) were added to refs/heads/main by this push:
new 8179785 CAMEL-17815: camel-jbang - In modeline mode then eager
discover routes and pre-load spec/* from camel-k integration yaml files to
allow properties to be used during bootstrap.
8179785 is described below
commit 8179785acfdf4a6579cd6ab2ec5803cfc088588d
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Mar 19 15:18:53 2022 +0100
CAMEL-17815: camel-jbang - In modeline mode then eager discover routes and
pre-load spec/* from camel-k integration yaml files to allow properties to be
used during bootstrap.
---
.../src/main/java/org/apache/camel/spi/RoutesLoader.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git
a/core/camel-api/src/main/java/org/apache/camel/spi/RoutesLoader.java
b/core/camel-api/src/main/java/org/apache/camel/spi/RoutesLoader.java
index e00720e..f67d475 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/RoutesLoader.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/RoutesLoader.java
@@ -116,6 +116,14 @@ public interface RoutesLoader extends CamelContextAware {
*/
Collection<RoutesBuilder> findRoutesBuilders(Collection<Resource>
resources) throws Exception;
+ /**
+ * Pre-parses the {@link RoutesBuilder} from {@link Resource}.
+ *
+ * This is used during bootstrap, to eager detect configurations from
route DSL resources which makes it possible to
+ * specify configurations that affect the bootstrap, such as by
camel-jbang and camel-yaml-dsl.
+ *
+ * @param resource the resource to be pre parsed.
+ */
default void preParseRoute(Resource resource) throws Exception {
// noop
}