【问题标题】:Multiple sling configs with same name具有相同名称的多个吊索配置
【发布时间】:2015-02-10 07:56:30
【问题描述】:

如果 CRX 中有多个同名的 sling 配置节点,并且如果我在我的 OSGi 服务中调用 configAdmin.getConfiguration,它会选择哪个配置值?我在 config.qa、config.local、config 等应用程序下有多个配置目录,它们具有相同的配置节点。如何让 CQ5 选择 config.qa 而不是 config?我确实在 sling.properties 文件中添加了属性 sling.run.mode=publish,qa 。它仍在获取 config 文件夹而不是 config.qa 下定义的属性。为什么不像 http://docs.adobe.com/docs/en/cq/5-4/deploying/configuring_osgi.html 的文档那样从 config.qa 文件夹中挑选道具?

【问题讨论】:

    标签: aem sling


    【解决方案1】:

    它应该总是选择最匹配的一个。例如,如果您将运行模式设置为 author、dev、intranet,然后您有 config.author、config.dev、config.intranet 和 config.dev.intranet 等配置,那么在这种情况下将选择 config.dev.intranet。确保您覆盖此文件夹中的通用配置以使其正常工作。详情请查看http://www.wemblog.com/2012/10/how-to-work-with-configurations-in-cq.html

    瑜伽

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-03-15
      • 1970-01-01
      • 2013-03-31
      • 2011-09-16
      • 1970-01-01
      • 2018-01-18
      • 2012-08-30
      • 2021-01-10
      相关资源
      最近更新 更多