如何使用Spring DSL
in定义属性Apache Camel
?使用 Blueprint,您可以通过以下方式完成:
<cm:property-placeholder persistent-id="org.apache.servicemix.examples.cxf.receive" update-strategy="reload">
<cm:default-properties>
<cm:property name="CXFserver" value="http://localhost:8989/"/>
<cm:property name="service" value="soap" />
</cm:default-properties>
</cm:property-placeholder>
<camelcxf:cxfEndpoint id="personService"
address="${CXFserver}${service}"
serviceClass="org.apache.servicemix.examples.camel.soap.PersonService"
/>
但是对于 Spring DSL,我应该像上面的示例一样做什么?在我的camel-cxf.xml
文件下面:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://camel.apache.org/schema/cxf"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd">
<!-- setting up a Camel CXF web-service -->
<cxf:cxfEndpoint id="orderEndpoint"
loggingFeatureEnabled="true" address="http://localhost:9000/order/"
serviceClass="com.aa.kk.service.OrderService" />
</beans>