![](/img/trans.png)
[英]How to save xml configuration filled with values from properties file in Apache Commons Configuration can't save
[英]Can we set Kafka properties with apache camel, in spring XML configuration file
XML配置是否可以訪問apache camel中的kafka屬性
There is no kafka and spring XML configuration is available anywhere
<camelContext xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="direct:SpringXMLRouteStart" /> <setHeader headerName="CamelHttpMethod"> <constant>GET</constant> </setHeader> <!-- To printout the routing message on the IDE console --> <to uri="http://localhost:8080/v1/get/WGS/inboundCMMessage1" /> </route> <route> <from uri="http://localhost:8080/v1/get/WGS/inboundCMMessage1" /> <to uri="kafka://localhost:9092?topic=customtopic&zookeeperHost=localhost:2181" /> </route> </camelContext>
.....................我的錯誤...............
org.xml.sax.SAXParseException: The reference to entity "zookeeperHost" must end with the ';' delimiter.
提前致謝
由於您使用的是XML,因此您不能像使用Java DSL那樣在路由URI中使用“&”,這樣做:
&zookeeperHost=localhost:2181
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.