0
AEM 5.6.1에서 실행되는 간단한 Sling 필터를 작성하고 있습니다. 필자는 필터에 구성 등록 정보를 사용하게 만들었고/system/console/configMgr에 나타날 것으로 예상 했었지만 그렇지 않았습니다. 나는 번들을 설치 할 수있어Apache Felix에 SlingFilter 추가 configMgr
@SlingFilter(generateComponent = true, generateService = true, order = -700, scope = SlingFilterScope.REQUEST)
public class SimpleFilter implements Filter {
@Property(value = "property.defaultvalue")
private static final String PROPERTY_KEY = "property.key";
private String configuredValue;
@Activate
protected void activate(final ComponentContext componentContext) throws Exception {
Map<String, String> config = (Map<String, String>) componentContext.getProperties();
this.configuredValue = config.get(PROPERTY_KEY);
}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
System.out.println(this.configuredValue);
}
}
는 필터가 작동하고/시스템/콘솔/번들에서 찾을 수 있습니다 것을 볼 수 있지만 I처럼/시스템/콘솔/ConfigMgr에 추가되지 않습니다 @Property 주석의 유언장에서 생각했습니다. 나는 한 걸음도 놓쳤는가?