This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch camel-2.25.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.25.x by this push:
new 7c1c597 [CAMEL-16063]should consider multiple ApplicationContext
instances when specifying another management.server.port
7c1c597 is described below
commit 7c1c597f6f78c7aa5d0779713c1b98a5a512df3c
Author: Freeman Fang <[email protected]>
AuthorDate: Tue Jan 19 14:36:18 2021 -0500
[CAMEL-16063]should consider multiple ApplicationContext instances when
specifying another management.server.port
---
.../src/main/java/org/apache/camel/spring/boot/RoutesCollector.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java
index e0064f5..a52e215 100644
---
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java
+++
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/RoutesCollector.java
@@ -84,7 +84,8 @@ public class RoutesCollector implements
ApplicationListener<ContextRefreshedEven
CamelContext camelContext =
applicationContext.getBean(CamelContext.class);
// only add and start Camel if its stopped (initial state)
- if (event.getApplicationContext() == this.applicationContext
+ if ((event.getApplicationContext() == this.applicationContext
+ || event.getApplicationContext().getParent() ==
this.applicationContext)
&& camelContext.getStatus().isStopped()) {
LOG.debug("Post-processing CamelContext bean: {}",
camelContext.getName());