Apache camel ApacheCamel:如何读取文件uri组件中的整数属性

Apache camel ApacheCamel:如何读取文件uri组件中的整数属性,apache-camel,jbossfuse,Apache Camel,Jbossfuse,我试图读取一个属性的整数值,但出现了错误。 我确实读过在链接中为XML DSL中的任何类型的属性使用属性占位符。但是我不理解它在文件uri组件中的用法 <from id="listenIncomingFiles" uri="file:{{PFlowIn_AEROW}}?include=.*\.xml&amp;prop:delay={{PFlowScanDelay}}&amp;noop=false&amp;preMove={{PMessDir}}"/> Fai

我试图读取一个属性的整数值,但出现了错误。 我确实读过在链接中为XML DSL中的任何类型的属性使用属性占位符。但是我不理解它在文件uri组件中的用法

<from id="listenIncomingFiles" uri="file:{{PFlowIn_AEROW}}?include=.*\.xml&amp;prop:delay={{PFlowScanDelay}}&amp;noop=false&amp;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}]
请引导。

你能试试吗

<from id="listenIncomingFiles" uri="file:{{PFlowIn_AEROW}}?include=.*\.xml&amp;delay={{PFlowScanDelay}}&amp;noop=false&amp;preMove={{PMessDir}}"/>
而不是

<from id="listenIncomingFiles" uri="file:{{PFlowIn_AEROW}}?include=.*\.xml&amp;prop:delay={{PFlowScanDelay}}&amp;noop=false&amp;preMove={{PMessDir}}"/>

即prop:delay={{PFlowScanDelay}}应替换为delay={{PFlowScanDelay}}。设置使用者属性时不需要prop:prefix。

我在IDE中遇到编译时错误。参数delay需要一个数值。这只是您的IDE吗?如果是这样,你可以忽略它。如果您只是想在端点URI中注入属性,我建议您使用属性占位符。如果这仍然不起作用,您可以共享您的配置文件或小项目吗?是的,这是一个问题,我已经阅读了在您提供的链接中为XML DSL中的任何类型的属性使用属性占位符的部分。这是一个示例路由,其中PScanDelay is参数在etc文件夹中的Blueprint属性文件中定义