[英]how to replace osgi configuration properties through aem dialog
我在下面的博客中進行搜索,但是沒有找到確切的解決方案,最初我是通過java類配置OSGI配置屬性的,我想從對話框輸入中替換這些值。
可以通過“ OSGI服務配置”對話框來配置OSGI屬性。 例如
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配置選項卡上找到所有配置
您的服務必須具有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並使用動態生成的屬性對話框修改屬性。 這是系統的默認行為。
希望這可以幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.