OSGi控制台中进行的配置保存在哪里? [英] Where are the Configurations made in OSGi Console saved?
问题描述
当我们在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:
- 个节点,无论是属性文件还是节点
jcr:primaryType
为sling:OsgiConfig
的JCR节点
- 个节点,这些是AEM随附组件的OOTB定义 本地文件系统上
-
.config files
.
/apps/*/config
下的/libs/*/config
下类型为sling:OsgiConfig
的<aem-installation-directory>/crx-quickstart/launchpad/config/
中的- nodes under
/apps/*/config
, be it property files or JCR nodes with the nodejcr:primaryType
ofsling:OsgiConfig
- nodes with type
sling:OsgiConfig
under/libs/*/config
, these are OOTB definitions for components that come with AEM .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:
- 删除刚刚创建的
sling:OsgiConfig
节点 - 转到Felix控制台的
configMgr
,找到相关服务并删除配置. - 重新创建
sling:OsgiConfig
节点(我通常将其保存在可以简单地重新安装的CRX软件包中)
- Delete the
sling:OsgiConfig
node you just created - Go to the Felix console's
configMgr
, find the relevant service and Delete the configuration. - Recreate the
sling:OsgiConfig
node (I usually keep those in a CRX package that I can simply reinstall)
这篇关于OSGi控制台中进行的配置保存在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!