【发布时间】:2012-12-26 09:32:13
【问题描述】:
是否可以使用骆驼属性组件将消息头设置为从属性文件中读取的值?我可以将此类属性设置为 URI 选项,但无法将它们设置为标头值。
我需要这样的东西:
<camel:setHeader headerName="actionId">
<camel:constant>{{onus.transPosting.RtSFailed}}</camel:constant>
</camel:setHeader>
其中onus.transPosting.RtSFailed 是在使用骆驼属性组件导入的文件上设置的属性键。
注意:我使用的是 Apache Camel 2.10.1
更新
按照this discussion 的建议使用<propertyPlaceholder> 不起作用,它会导致异常:
Caused by: org.apache.camel.language.simple.types.SimpleParserException: Unknown function: onus.transPosting.RtSFailed
【问题讨论】:
-
<simple>${onus.transPosting.RtsFailed}</simple>不起作用? (就像没有使用 Apache Camel 的经验一样好) -
感谢康斯坦丁,请检查我在帖子上的更新
标签: java apache-camel