Apache camel 未能将属性设置为延迟器

Apache camel 未能将属性设置为延迟器,apache-camel,Apache Camel,我遇到了一个问题,当我使用这个spring camel上下文时,我在从String到Long的类型转换方面遇到了错误,与第二个{{retryCount}}有关。当我开始调试时,我意识到BaseTypeConverterRegistryconvertTo方法在第一次出现时得到了retryCount值,在第二个case delayer组件中得到了{retryCount},所以我不知道为什么 我的春天背景: <propertyPlaceholder location="classpath:cam

我遇到了一个问题,当我使用这个spring camel上下文时,我在从String到Long的类型转换方面遇到了错误,与第二个{{retryCount}}有关。当我开始调试时,我意识到BaseTypeConverterRegistryconvertTo方法在第一次出现时得到了retryCount值,在第二个case delayer组件中得到了{retryCount},所以我不知道为什么

我的春天背景:

<propertyPlaceholder location="classpath:camel.properties" id="properties" />
  <route id="mojorun">
    <from uri="timer://runOnce?delay=0&amp;repeatCount=1" />
    <loop>
      <spring:constant>{{retryCount}}</spring:constant>
      <spring:inOnly uri="bean:mojo?method=shout"/>
      <spring:delay>
        <spring:constant>{{retryCount}}</spring:constant>
      </spring:delay>
    </loop>
  </route>

您使用的是什么版本的Camel?2.10.0而且我还发现,如果我对返回delay的bean使用这种方式,它会从属性文件中设置其字段。因此,Delayer组件无法从属性中解析值,它在从type:java.lang.String转换到所需的type:java.lang.Long(值为{retryCount}})的过程中抛出TypeConversionException:Error,因此它将{{{retryCount}}解析为循环的值,而不将delayerName问题与答案一起发布在Camel上-