Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/395.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Mule Studio中为Java组件提供属性Bean?_Java_Spring_Components_Mule_Esb - Fatal编程技术网

如何在Mule Studio中为Java组件提供属性Bean?

如何在Mule Studio中为Java组件提供属性Bean?,java,spring,components,mule,esb,Java,Spring,Components,Mule,Esb,在Mule Studio 3.5中,直接在XML和流中,我有以下声明: <component class="fr.esb.bo.GenerateReportFileComponent" doc:name="BOreport"> <spring:property name="boServices" ref="boServices"/> </component> 我理解这一点,但如何将我的boservicesbean

在Mule Studio 3.5中,直接在XML和流中,我有以下声明:

<component class="fr.esb.bo.GenerateReportFileComponent" doc:name="BOreport">           
            <spring:property name="boServices" ref="boServices"/>
</component>
我理解这一点,但如何将我的boservicesbean提供给我的组件呢?
使用定制的转换器,这项工作正常。

将您的类定义为Springbean:

<spring:beans>
  <spring:bean id="restaurantWaiter" scope="prototype" class="com.foo.RestaurantWaiter">
    <spring:property name="kitchenService">
        <spring:ref local="kitchenService"/>
    </spring:property>
  </spring:bean>
</spring:beans>

<component>
  <spring-object bean="restaurantWaiter"/>
</component>

如前所述。

将您的类定义为Springbean:

<spring:beans>
  <spring:bean id="restaurantWaiter" scope="prototype" class="com.foo.RestaurantWaiter">
    <spring:property name="kitchenService">
        <spring:ref local="kitchenService"/>
    </spring:property>
  </spring:bean>
</spring:beans>

<component>
  <spring-object bean="restaurantWaiter"/>
</component>

如前所述。

感谢您的快速回答,顺便说一句,组件没有关闭,在文档中也是如此。快速复制粘贴…:D修复了关闭标签。感谢您的快速回答,顺便说一下,组件没有关闭,在文档中也是如此。快速复制粘贴…:D修复了关闭标签。