Error: Subresource for target class has no jax-rs annotations.: classname that prevented it from fulfilling this request.
Context: @Path(“foo”) JAXRSAccount JAXRSAccounts.getAccount()
Resolution: Check that the sub-resource (JAXRSAccount) has at least one method with a @GET/POST/etc annotation.
And check it is declared as public.
这个错误表示没有找到@Method注释的方法,需要在对应的方法增加@GET或者@POST 等方法的注解。
来自:http://blog.2partsmagic.com/2009/04/subresource-for-target-class-has-no-jax-rs-annotations/
本文介绍了解决JAX-RS框架中子资源类缺少必要HTTP方法注解的问题,例如@GET或@POST等。通过检查并确保子资源类(如JAXRSAccount)中至少有一个带有合适HTTP方法注解的方法,并确认该方法为公共可见。
865

被折叠的 条评论
为什么被折叠?



