R6 Annotaion | Community
Skip to main content
manoj_devapath
Level 5
April 9, 2019
Solved

R6 Annotaion

  • April 9, 2019
  • 1 reply
  • 2220 views

When using R6 annotation for a service

import org.osgi.service.component.annotations.Component;

import org.osgi.service.component.annotations.ConfigurationPolicy;

@Component(service = SampleService.class, immediate = true, configurationPolicy = ConfigurationPolicy.REQUIRE)

public class SampleServiceImpl implements SampleService{ }

How do I add label and description for the service.

Please suggest

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Gaurav-Behl

Use   property = {"process.label=something" }

@Component(immediate = true, property = { "process.label=mylabel", "process.description=mydesc" })

check-

AEM Developer Learning : Migration of SCR annotations to OSGi R6 annotations in AEM 6.3

1 reply

Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
April 9, 2019

Use   property = {"process.label=something" }

@Component(immediate = true, property = { "process.label=mylabel", "process.description=mydesc" })

check-

AEM Developer Learning : Migration of SCR annotations to OSGi R6 annotations in AEM 6.3