关于OSGi配置的问题

Questions about OSGi configuration

如果我从 OSGi 包配置控制台进行配置,配置文件存储在 /apps/system/config

这是我的问题:

  1. config文件夹下的配置是否适用于两者 作者和发布实例?
  2. 如果是,那么我们将如何连接他们?

您需要构建一个包含此节点的内容包,并根据需要在您的其他实例上使用。

具体运行模式结构如下:

  1. config - 适用于所有 运行 模式
  2. config.author - 作者环境
  3. config.publish - 对于发布环境
  4. config. - 视情况而定

i.e. the presence of these nodes in which environment will decide their effectiveness.

来自 Adob​​e 文档Configuration Persistence如下

如果您通过 Web 控制台更改配置,它(通常)会写入存储库:/apps/{somewhere}

By default {somewhere} is system/config so the configuration is written to /apps/system/config

但是,如果您正在编辑最初来自存储库其他地方的配置:例如:/libs/foo/config/someconfig 然后更新的配置写在原来的位置下;例如:/apps/foo/config/someconfig