我有一个Java的web服务方法,其中在地方的回报则显示为错误The method ok() is undefined for the type Response
这里是我的代码如下Java Webservice方法返回显示为编译类型错误?
@Path("/deleteMethod")
@GET
@Produces({"application/json"})
public Response deleteServiceMethod(@QueryParam("allPatients") boolean allPatients, @QueryParam("PatientName") String PatientName, @QueryParam("PatientPlace") String PatientPlace)
throws IOException, InterruptedException
{
//my logic is present here
return Response.ok().build();
}
可有人告诉我这是什么样的错误,我应该需要添加任何广口瓶为了这?
检查你的Response类,从你导入了哪个包?它应该是:'javax.ws.rs.core.Response' – ACV
@ACV,我已经添加了,虽然它显示相同的错误 – khanam
我可以知道为什么投票下来吗? – khanam