Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this strange Jersey warning mean?

Tags:

java

jersey

What does this warning mean in Jersey 1.4:

WARNING: A sub-resource method, public final java.lang.String com.XXX.render(),  with URI template, "/", is treated as a resource method 

This is how the method looks:

@GET @Produces(MediaType.APPLICATION_XML) @Path("/") public final String render() {   return "test"; } 
like image 338
yegor256 Avatar asked Dec 02 '10 09:12

yegor256


1 Answers

Why do you need specify such path for method? @Get is enough to tell jersey that it is default method for entire class (I'm assuming that your class has some @Path("/MyRes") annotation).

like image 163
Dewfy Avatar answered Sep 21 '22 00:09

Dewfy