1
我想使用文本文件来配置Apache Sling服务用户映射程序服务。我在jcr_root/apps/sling/config
下创建了一个文件,这个文件被称为org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.json。如何在Sling中使用描述符文件配置OSGi服务?
这是文件的内容:
{
"jcr:primaryType":"sling:OsgiConfig",
"user.mapping" : "artifact.name=systemUserName"
}
该文件在JCR创建和属性是否正确解决,但没有被配置的服务。如何解决这个问题?
这是部分正确的。 Apache Sling JCR安装程序是可配置的,请参阅:http:// localhost:8080/system/console/configMgr/org.apache.sling.installer.provider.jcr.impl.JcrInstaller。开箱即用,您可以将OSGi配置存储在“install”或“config”中,该配置可以达到4层深度。标准做法是使用'config'文件夹而不是'install',比如'/ apps//config'。从那里,你可以进入运行模式规范,例如'config.prod.chicago'或'config.qa'。 –
nateyolles