您好我使用java jersey创建了Web服务。我正在使用查询参数。但是如果我传递参数,则数据最终结果将存储为空值。
here is my code.
@Path("/val")
public class RESTservice {
@POST
@Path("/store")
public Response getMsg(
@QueryParam("city") final String city,
@QueryParam("locality")final String locality)
StoreIntoHDFS obj = new StoreIntoHDFS(city,locality);
String response1 = obj.storeAddress();
return Response.status(200).entity(response1.toString()).build();
}
}
JSON Structure
data - > array
{
page_1
{
parameters
}
}
}
数据为空值。欢迎任何帮助。