我正在尝试读取属性的整数值,但我收到错误。 我读过"在XML DSL中使用属性占位符来表示任何属性"在链接http://camel.apache.org/properties.html中。但我不理解文件uri组件中它的用法。
<from id="listenIncomingFiles" uri="file:{{PFlowIn_AEROW}}?include=.*\.xml&prop:delay={{PFlowScanDelay}}&noop=false&preMove={{PMessDir}}"/>
Failed to create route .... because of Failed to resolve endpoint: file://D:/data/AeroW/OUT?include=.*\.xml&noop=false&preMove=D%3A%2Fdata%2FMessageDir&prop%3Adelay=2000 due to: Failed to resolve endpoint: file://D:/data/AeroW/OUT?include=.*\.xml&noop=false&preMove=D%3A%2Fdata%2FMessageDir&prop%3Adelay=2000 due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{prop:delay=2000}]
请指导。
答案 0 :(得分:1)
你能试试吗
<from id="listenIncomingFiles" uri="file:{{PFlowIn_AEROW}}?include=.*\.xml&delay={{PFlowScanDelay}}&noop=false&preMove={{PMessDir}}"/>
而不是
<from id="listenIncomingFiles" uri="file:{{PFlowIn_AEROW}}?include=.*\.xml&prop:delay={{PFlowScanDelay}}&noop=false&preMove={{PMessDir}}"/>
即&#34; prop:delay = {{PFlowScanDelay}}&#34;应替换为&#34; delay = {{PFlowScanDelay}}&#34;。不需要&#34;道具:&#34;设置消费者属性时的前缀。