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

ffang 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 84d7d22  [CAMEL-16063]should consider multiple ApplicationContext 
instances when specifying another management.server.port (#260)
84d7d22 is described below

commit 84d7d22d5c46d95cf2b3d355f43ad9afed79775c
Author: Freeman(Yue) Fang <freeman.f...@gmail.com>
AuthorDate: Tue Jan 19 14:21:12 2021 -0500

    [CAMEL-16063]should consider multiple ApplicationContext instances when 
specifying another management.server.port (#260)
---
 .../apache/camel/spring/boot/CamelSpringBootApplicationListener.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelSpringBootApplicationListener.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelSpringBootApplicationListener.java
index 1bc09af..ba06952 100644
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelSpringBootApplicationListener.java
+++ 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelSpringBootApplicationListener.java
@@ -85,7 +85,8 @@ public class CamelSpringBootApplicationListener implements 
ApplicationListener<C
         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());
 

Reply via email to