Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Migrate property annotation according to OSGI R6 anotations

Avatar

Level 1

Recently we have started upgrading code base from Maven SCR annotation to OSGI R6 annotations. I have below one scenario where it does requires to have multiple property values as below. Can someone help me how can it be migrated according to R6 annotation? Much appreciated your help!

 

        property = {
                "sling.servlet.selectors" + "establish",
                "sling.servlet.extensions" + "pdf","txt","jpeg","html",
                "sling.servlet.resourceTypes" + "NT_PSEUDO_PAGE",
        })

 

tried using regex but did not worked.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @jamesgall,

For every extension, It should have discrete entries as below

property = {
"sling.servlet.selectors" + "establish", "sling.servlet.resourceTypes=" + "NT_PSEUDO_PAGE", "sling.servlet.selectors=" + "pdf", "sling.servlet.extensions=" + "txt", "sling.servlet.extensions=" + "jpeg", "sling.servlet.extensions=" + "png", })

Hope that helps!

Regards,

Santosh

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @jamesgall,

For every extension, It should have discrete entries as below

property = {
"sling.servlet.selectors" + "establish", "sling.servlet.resourceTypes=" + "NT_PSEUDO_PAGE", "sling.servlet.selectors=" + "pdf", "sling.servlet.extensions=" + "txt", "sling.servlet.extensions=" + "jpeg", "sling.servlet.extensions=" + "png", })

Hope that helps!

Regards,

Santosh