我搜索了下面的博客,但我找不到确切的解决方案,最初我通过java类配置了OSGI配置属性,我想从对话框输入中替换这些值。
答案 0 :(得分:2)
OSGI属性可以通过OSGI服务配置对话框进行配置。 E.g。
AEMFormsManagerConfiguration
的链接将是
http://localhost:4502/system/console/configMgr/com.adobe.aem.formsndocuments.config.AEMFormsManagerConfiguration com.my.package.MyClass
http://localhost:4502/system/console/configMgr/com.my.package.MyClass 您可以在特殊的 OSGI Configuration标签上找到所有配置
答案 1 :(得分:1)
您的服务必须包含org.apache.felix.scr.annotations.Service
和可选的org.apache.felix.scr.annotations.Component
注释。
使用org.apache.felix.scr.annotations.Properties
和org.apache.felix.scr.annotations.Property
,如下例所示:
@Properties({
@Property(
label = "Some Property",
description = "Some custom property",
name = "myComponent.property",
value = "default value"
)
})
部署服务后,您可以转到AEM实例的/ system / console / configMgr,并使用动态生成的属性对话框修改属性。这是系统的默认行为。
希望这有帮助。