Reputation: 713
I am programmatically adding child resources via the resource builder and need the resulting resource method to have the PermitAll annotation present. Is this possible using some jersey API?
Upvotes: 1
Views: 143
Reputation: 713
So, with my request filter checking for PermitAll annotation on the resource method, I relaized I can annotate the Inflector.apply() method directly to make the request filter work without modifying it.
resourceBuilder.handledBy(new Inflector<ContainerRequestContext, String>() {
@Override
**@PermitAll**
public String apply(ContainerRequestContext data) {
// ...
}
}
Upvotes: 1