Expand my Community achievements bar.

SOLVED

R6 Annotaion

Avatar

Level 6

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

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

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