Spring Bootを使用してプロジェクトを開発しています。GETリクエストを受け入れるコントローラーを持っています。
現在、次の種類のURLへのリクエストを受け付けています。
しかし、クエリパラメータを使用してリクエストを受け入れたい:
これが私のコントローラーのコードです:
@RequestMapping(value="/data/{itemid}", method = RequestMethod.GET)
public @ResponseBody
item getitem(@PathVariable("itemid") String itemid) {
item i = itemDao.findOne(itemid);
String itemname = i.getItemname();
String price = i.getPrice();
return i;
}
@RequestParam
(良い出発点:公式ガイド)