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 6b732ecf17c4 CAMEL-22922: camel-main - Fix should not autowire stubbed
components
6b732ecf17c4 is described below
commit 6b732ecf17c4be1f9d3b3e08cadb923a2afc8927
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Jan 28 19:58:26 2026 +0100
CAMEL-22922: camel-main - Fix should not autowire stubbed components
---
.../java/org/apache/camel/main/MainAutowiredLifecycleStrategy.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/core/camel-main/src/main/java/org/apache/camel/main/MainAutowiredLifecycleStrategy.java
b/core/camel-main/src/main/java/org/apache/camel/main/MainAutowiredLifecycleStrategy.java
index d6074a10574b..9224df34feba 100644
---
a/core/camel-main/src/main/java/org/apache/camel/main/MainAutowiredLifecycleStrategy.java
+++
b/core/camel-main/src/main/java/org/apache/camel/main/MainAutowiredLifecycleStrategy.java
@@ -97,6 +97,10 @@ public class MainAutowiredLifecycleStrategy extends
LifecycleStrategySupport imp
}
protected boolean isEnabled(String name, Component component) {
+ // skip autowiring sutbbed components
+ if (component.getClass().getSimpleName().equals("StubComponent")) {
+ return false;
+ }
return camelContext.isAutowiredEnabled() &&
component.isAutowiredEnabled();
}