A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by“@Consumes” and “@Produces” annotations

后端 未结 4 1425
北荒
北荒 2021-01-17 17:37

How can the following produce this error when they have different URLs ?

@Path(\"/job/{empId}/empProfile\")
public EmpProfileResource delegateToEventProfileR         


        
4条回答
  •  情深已故
    2021-01-17 18:10

    Remove the @Path("/") from the sub-resource classes. Sub-resource classes don't need them. And if they have them, they get added as root resource classes, if you are scanning for @Path annotated classes. And this is the problem. You haven't show the methods of the sub-resource classes, but because the have the same root path, I would imagine that the problem is caused by some overlapping methods. So just remove the @Path("/") on sub-resource classes, and you should be OK.

提交回复
热议问题