Hi Kevin,
On Jan 26, 2010, at 7:20 AM, Kevin Duffey wrote:
> Hey all,
>
> I am unable to see my list of emails right now, so if this has been
> asked I apologize and please refer me to the thread link.
>
> I am using GF3 with Jersey, loving the heck out of it. I configure
> Jersey with:
>
> @ApplicationPath("")
> public class RestConfigApplication extends Application {
> }
>
> Works great. What I am lacking now tho is how to configure the
> request filters I had for version checks and authentication. As
> well, if this is possible to do with annotations, can response
> filters be handled in the same manner.
>
It is not currently possible with annotations.
You can do the following:
@ApplicationPath("")
public class RestConfigApplication extends DefaultResourceConfig {
public RestConfigApplication() {
List<? extends ContainerResponseFilter> l =
Collections.singletonList(MyFilter.class);
getProperties
().put(ResourceConfig.PROPERTY_CONTAINER_RESPONSE_FILTERS, l);
}
}
Paul.