Skip to content

Instantly share code, notes, and snippets.

@yupadhyay
Created November 24, 2014 06:12
Show Gist options
  • Save yupadhyay/73ec7a88b754ff3c3ca2 to your computer and use it in GitHub Desktop.
Save yupadhyay/73ec7a88b754ff3c3ca2 to your computer and use it in GitHub Desktop.
@Service(value=<Your Class>.class)
@Component(label = "....", description = "..", metatype = true, immediate=true)
@Properties({
@Property(name="service.description", value=".."),
@Property(name="service.vendor", value="..")
})
public class <Your class> implements <Interface> {
//Single value
@Property(unbounded=PropertyUnbounded.DEFAULT,description=".....")
private static final String VALUE1 = "my.custom.value1";
//Multivalue property
@Property(unbounded=PropertyUnbounded.ARRAY,description="....")
private static final String VALUE2 = "my.custom.value2";
@Property(unbounded=PropertyUnbounded.ARRAY,description="....")
private static final Long VALUE3 = "my.custom.value3";
@jeeralab
Copy link

good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment