how to replace @properties annotation in aem 6.4 using OSGi R6 annotations
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service
@Component(label="Myproject Service")
@Properties({
@Property(name = Constants.SERVICE_RANKING, intValue = 400, propertyPrivate = true),
@Property(name = "priority", intValue = 200)
})
@Service({Myservice.class})
The felix scr annotations in aem 6.2 is now replaced with OSGi R6 annotations. But how to replace it ?
I have tried one method. Please do let me know is it correct and how to use "properties" in OSGI R6.
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.osgi.service.metatype.annotations.ObjectClassDefinition;
@Component(service=Myservice.class,immediate = true,name="Myproject Service",
property = {"Constants.SERVICE_RANKING="+"400","priority="+"200" })
Is this correct ?
and how to use properties label in OSGi R6 ?