OSGi控制台中进行的配置保存在哪里? [英] Where are the Configurations made in OSGi Console saved?

查看:106
本文介绍了OSGi控制台中进行的配置保存在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们在Apache Felix Web OSGi控制台的配置"选项卡中更新组件的任何配置时,这些配置设置保存在哪里?这是针对AEM 6.0或更高版本的.

When we update any configuration for a component in the Configurations tab in the Apache Felix Web OSGi Console, where are these configuration settings saved? This is with respect to AEM 6.0 or above.

推荐答案

手动保存的配置设置存储在crx-quickstart/launchpad/config目录(在本地文件系统中的AEM安装文件夹中)中,此外,在/apps/system/config的内容存储库中作为.config文件.

The manually saved configuration settings are stored in the the crx-quickstart/launchpad/config directory (in your AEM installation folder in the local file system) and, on top of that, as .config files in the Content Respository at /apps/system/config.

例如,如果要查找com.example.MyComponent的配置,则可以在crx-quickstart/launchpad/config/com/example/MyComponent.config(在本地文件系统中)和内容存储库内的/apps/system/config/com.example.MyComponent.config中以文本文件的形式找到它.

For example, if you're looking for the configuration of com.example.MyComponent, you can find it as a text file in crx-quickstart/launchpad/config/com/example/MyComponent.config (in the local file system) and at /apps/system/config/com.example.MyComponent.config inside your Content Repository.

当您在OSGi控制台中手动更改设置时,将更新这两个位置的文件.

The files at these two locations are updated when you change the settings manually in the OSGi console.

在AEM中,您还可以将配置存储在sling:OsgiConfig类型的JCR节点中.当您手动保存配置时,将不会创建或更新这些文件,但是它们提供了一种将配置作为内容进行管理的简洁方法.

In AEM you can also store configuration in JCR nodes of the type sling:OsgiConfig. These will not be created or updated when you manually save the config but they offer a neat way of managing configuration as content.

当AEM查找配置时,使用以下分辨率顺序:

When AEM looks for the configuration, the following order of resolution is used:

    /apps/*/config下的
  1. 个节点,无论是属性文件还是节点jcr:primaryTypesling:OsgiConfig
  2. 的JCR节点 /libs/*/config下类型为sling:OsgiConfig
  3. 个节点,这些是AEM随附组件的OOTB定义
  4. 本地文件系统上<aem-installation-directory>/crx-quickstart/launchpad/config/中的
  5. .config files.
  1. nodes under /apps/*/config, be it property files or JCR nodes with the node jcr:primaryType of sling:OsgiConfig
  2. nodes with type sling:OsgiConfig under /libs/*/config, these are OOTB definitions for components that come with AEM
  3. .config files from <aem-installation-directory>/crx-quickstart/launchpad/config/ on the local file system.

根据 Apache Sling JCR Installer 的OSGi配置,可以在手动更改配置时将sling:OsgiConfig节点写回.还有许多设置会影响上述配置的查找,因此,熟悉此配置是个好主意.

Depending on the OSGi configuration of Apache Sling JCR Installer, the sling:OsgiConfig nodes can be written back to when you manually change the config. There's also a number of settings affecting the lookup of said configurations so it's a good idea to familiarise oneself with this config.

请查看官方文档获取更全面的信息.

Please check out the official documentation for more comprehensive information.

如果您尝试使配置存储在sling:OsgiConfig节点中以按预期工作,并且不确定是否已将同一服务的另一个配置缓存在某处,则以下步骤对我有用始终符合AEM 6.4:

If you're trying to get a config stored in a sling:OsgiConfig node to work as expected and you're unsure if another config for the same service has been cached somewhere, here's a sequence of steps that has worked for me consistently in AEM 6.4:

  1. 删除刚刚创建的sling:OsgiConfig节点
  2. 转到Felix控制台的configMgr,找到相关服务并删除配置.
  3. 重新创建sling:OsgiConfig节点(我通常将其保存在可以简单地重新安装的CRX软件包中)
  1. Delete the sling:OsgiConfig node you just created
  2. Go to the Felix console's configMgr, find the relevant service and Delete the configuration.
  3. Recreate the sling:OsgiConfig node (I usually keep those in a CRX package that I can simply reinstall)

这篇关于OSGi控制台中进行的配置保存在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆