Apache camel SpringXML中带有自定义bean的Camel拆分器

Apache camel SpringXML中带有自定义bean的Camel拆分器,apache-camel,Apache Camel,我使用以下xml配置为拆分器定义自定义bean <camel:split stopOnException="true"> <camel:method bean="splitterBean" method="split" /> <camel:to ref="sodSQLEndPoint"/> </camel:split> <bean id="splitterBean" class="com.proce

我使用以下xml配置为拆分器定义自定义bean

  <camel:split stopOnException="true">
      <camel:method bean="splitterBean" method="split" /> 
       <camel:to ref="sodSQLEndPoint"/>
    </camel:split>

 <bean id="splitterBean" class="com.processor.SodFundListSplitter" />

它不运行,并给出一个错误:

12:31:28.770[main]WARN org.apache.camel.util.ObjectHelper-找不到类:splitterBean


如果我使用body而不是customebean,它工作得很好。任何人都可以告诉我,如果有什么额外的事情要做,允许自定义bean与拆分器

尝试使用ref而不是bean

<camel:split stopOnException="true">
   <camel:method ref="splitterBean" method="split" /> 
   <camel:to ref="sodSQLEndPoint"/>
</camel:split>

尝试使用ref而不是bean

<camel:split stopOnException="true">
   <camel:method ref="splitterBean" method="split" /> 
   <camel:to ref="sodSQLEndPoint"/>
</camel:split>


即使将其更改为Ref也不起作用。我在14:53:19.445[main]WARN org.apache.camel.util.ObjectHelper时也遇到了同样的错误,将其更改为Ref后找不到class:splitterBeanEven不起作用。我在说14:53:19.445[main]WARN org.apache.camel.util.ObjectHelper时遇到了同样的错误-找不到类:splitterBean