禁用AEM中的Sling滤波器的参数

问题描述

我创建了一个吊带过滤器。以下是代码段-

@SlingFilter(label = "My filter",description = "Myfilter",Metatype = true,generateComponent = true,generateService = true,order = 0,scope = SlingFilterScope.INCLUDE)

public class SlinginoFilter implements Filter { 
}

当我部署代码时,我希望此过滤器被部署但处于禁用状态。这可以实现吗?

解决方法

您可以使用ACS公共组件禁用器禁用它: https://adobe-consulting-services.github.io/acs-aem-commons/features/osgi-disablers/component-disabler/index.html