Tuesday 6 December 2011

Jersey Annotation

Is your application server is throwing up the following warning at startup?
WARNING: A sub-resource method, public java.lang.String PATH_TO_METHOD, with URI template, "/", is treated as a resource method
Then the most likely cause of is that you have already defined a @Path("/blah") for the class. There is no need to specify @Path("/"), using @Get at the method level is enough to tell Jersey that it is default method for entire class.

No comments:

Post a Comment