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

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