0
我想读取属性的整数值,但我收到错误。 我读过链接http://camel.apache.org/properties.html的“在XML DSL中使用属性占位符来表示任何属性”。但我不明白它在文件uri组件中的用法。阿帕奇骆驼:如何读取文件中的整数属性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}]
请指导。
我在IDE中得到编译时错误“参数延迟需要一个数值。” –
这只是你的IDE抱怨吗?如果是这样,你可以忽略它。如果你只是想在你的端点URI中注入属性,我建议你使用Property place holder http://camel.apache.org/using-propertyplaceholder.html。 如果这仍然无法工作,你可以分享你的配置文件或小项目? – jpoth
是的,它的抱怨和我已阅读您提供的链接中的“在XML DSL中使用任何属性的属性占位符”一节。但它还没有工作。 –