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中使用任何屬性的屬性佔位符」一節。但它還沒有工作。 –