Skip to content

Instantly share code, notes, and snippets.

@chbaranowski
Created February 22, 2015 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chbaranowski/d8f2dddb2f00f58dca7c to your computer and use it in GitHub Desktop.
Save chbaranowski/d8f2dddb2f00f58dca7c to your computer and use it in GitHub Desktop.
import javax.ws.rs.*;
import aQute.bnd.annotation.component.Component;
import aQute.bnd.annotation.headers.RequireCapability;
@Component
@Path("/echo")
@Requieres.JAXRS_Whiteboard
public class SampleRessource {
@GET
public String echo(){
return "OK";
}
}
interface Requieres {
@RequireCapability(
ns="osgi.whiteboard",
filter="(osgi.whiteboard=java.ee.jaxrs)",
effective="active"
)
@interface JAXRS_Whiteboard { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment