这个奇怪的泽西岛警告是什么意思? [英] What does this strange Jersey warning mean?
本文介绍了这个奇怪的泽西岛警告是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此警告在泽西岛1.4中意味着什么:
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
这是该方法的外观:
@GET
@Produces(MediaType.APPLICATION_XML)
@Path("/")
public final String render() {
return "test";
}
推荐答案
为什么需要为方法指定这样的路径? @Get足以告诉jersey这是整个类的默认方法(我假设您的类具有一些@Path("/MyRes")批注).
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).
这篇关于这个奇怪的泽西岛警告是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文