簡體   English   中英

如何通過aem對話框替換osgi配置屬性

[英]how to replace osgi configuration properties through aem dialog

我在下面的博客中進行搜索,但是沒有找到確切的解決方案,最初我是通過java類配置OSGI配置屬性的,我想從對話框輸入中替換這些值。

可以通過“ OSGI服務配置”對話框來配置OSGI屬性。 例如

您可以在特殊的OSGI配置選項卡上找到所有配置

您的服務必須具有org.apache.felix.scr.annotations.Service和可選的org.apache.felix.scr.annotations.Component注釋。

使用org.apache.felix.scr.annotations.Propertiesorg.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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM