Skip to content

Instantly share code, notes, and snippets.

@hakandilek
Created July 9, 2014 15:07
Show Gist options
  • Save hakandilek/dd47f41cae26ba2f42c9 to your computer and use it in GitHub Desktop.
Save hakandilek/dd47f41cae26ba2f42c9 to your computer and use it in GitHub Desktop.
// jersey resources
Map<String, Object> resources = ctx.getBeansWithAnnotation(Path.class);
for (Map.Entry<String, Object> entry : resources.entrySet()) {
Object resource = entry.getValue();
Class<? extends Object> cls = resource.getClass();
if (cls.isAnnotationPresent(Path.class))
System.out.println(cls);
jersey.register(resource);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment