如何从 JBoss Fuse 的 Blueprint XML 中的属性文件读取值?
目前,我正在阅读如下内容,但我想从属性文件中读取。我可以使用 Spring BridgePropertyPlaceholoder 来实现它吗?
<cm:property-placeholder persistent-id="connections" update-
strategy="reload">
<cm:default-properties>
<cm:property name="xyz" value="http://xx.xx.x.x:x0x0/xxx/yyy"/>
<cm:property name="pqr" value="http://xx.xx.x.x:x0x0/xxx/yyy"/>
<cm:property name="lmn" value="mnopqr"/>
</cm:default-properties>
</cm:property-placeholder>
最佳答案
实际上,从它扩展的 blueprint-ext
和 blueprint-cm
支持属性文件的外部源,与默认的 ConfigAdmin
无关> 使用的位置。
它允许您编写如下内容:
```
<cm:property-placeholder persistent-id="mytest" update-strategy="reload">
<cm:location>file:///whatever/my.properties</ext:location>
</cm:property-placeholder>
```
此处引用 blueprint-cm
xsd:
http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.3.0.xsd
关于java - 如何从 Blueprint XML for JBoss Fuse 的属性文件中读取值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46054265/