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 9048817  [CAMEL-15174]need to set SpringBus to CxfRsSpringEndpoint
9048817 is described below

commit 904881786be84e542503d6b0edfa7e3c26d305fb
Author: Freeman Fang <freeman.f...@gmail.com>
AuthorDate: Wed Jun 10 10:54:24 2020 -0400

    [CAMEL-15174]need to set SpringBus to CxfRsSpringEndpoint
    
    (cherry picked from commit 828eb0d484b0fbb695652a67d989596bf7d3fea4)
---
 .../org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java    | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
index 46b235a..0d12f0f 100644
--- 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
+++ 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
@@ -20,6 +20,7 @@ package org.apache.camel.component.cxf.jaxrs;
 import org.apache.camel.Component;
 import org.apache.camel.component.cxf.spring.SpringJAXRSClientFactoryBean;
 import org.apache.camel.spring.SpringCamelContext;
+import org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor;
 import org.apache.cxf.configuration.spring.ConfigurerImpl;
 import org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean;
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
@@ -58,8 +59,12 @@ public class CxfRsSpringEndpoint extends CxfRsEndpoint 
implements BeanIdAware {
             setBeanId(((BeanIdAware)bean).getBeanId());
         }
 
+        
         ApplicationContext applicationContext = 
((SpringCamelContext)getCamelContext()).getApplicationContext();
         configurer = new ConfigurerImpl(applicationContext);
+        if (bus == null) {
+            bus = 
BusWiringBeanFactoryPostProcessor.addDefaultBus(applicationContext);
+        }
     }
 
     @Override

Reply via email to