0
@GET
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@Path("/categories")
public Response getAllCategories(@QueryParam(value = "code") String country_code) {
return userService.getAllCategories(country_code);
}
提取參數我的URL: 「?/用戶/類別代碼= + 91」如何從@QueryParam
我怎樣才能在RESTful網絡服務請求中提取參數 「91」。
代碼中沒有什麼Spring相關的,爲什麼它被標記爲spring和spring-mvc? –
嘗試刪除括號中的值。正如'@QueryParam(「code」)' –
@YoungMillie value =「code」完全等於只寫「code」。 –