【发布时间】:2016-02-28 04:46:54
【问题描述】:
我正在尝试从属性中提供 PGP 加密密钥的文件路径。
.setHeader("CamelPGPDataFormatKeyFileName")
.constant("file:{{devo_keyringUri}}")
{{devo_keyringUri}} 被定义为类似于${karaf.base}/etc/devKeyring.gpg
我认为${karaf.base} 会被属性组件解析,但它不起作用。我收到了java.io.FileNotFoundException - ${karaf.base}/etc/devKeyring.gpg
所以它解析占位符但不解析“嵌套”变量。
我需要做什么才能在${karaf.base} 中获得解析的路径?
Camel Version is 2.13.2
Karaf Version is 2.3.9
编辑
它也不适用于较新的版本:
Camel Version is 2.15.3
Karaf Version is 4.0.1
【问题讨论】:
-
尝试将 Camel 升级为旧版本
-
@ClausIbsen 感谢您的提示。现在尝试在 Karaf 4.0.1 上使用 Camel 2.15.3,但也没有运气(与描述的结果相同)。
-
试试
{{sys:karaf.base}}/etc/devKeyring.gpg
标签: properties apache-camel apache-karaf properties-file