264.10. 使用 Registry 中的属性
从 Camel 2.4
开始,例如在 OSGi 中,您可能希望公开服务,该服务将属性返回为 java.util.Properties
对象。
然后您可以按如下方式设置 Properties 组件:
<propertyPlaceholder id="properties" location="ref:myProperties"/>
其中 myProperties
是在 OSGi 注册表中用于查找的 id。请注意,我们使用 ref:
前缀来告知 Camel 它应该查找 Registry 的属性。