私の既存のコードは以下の通りです:
@RequestMapping(value = "/{id}/{type}/{answer}", method = RequestMethod.GET)
@ResponseBody
public Results answer(@PathVariable("id") int questionId,
@PathVariable int type,
@PathVariable Boolean answer) {
//do something
}
上記と同じパターン (つまり、/id/type/answer/id/type/answer/id/type/answer/. ..等。)。
したがって、理想的には、次の URL の両方をサポートできる API 呼び出しを作成できるようにしたいと考えています。
http://www.example.com/sendAnswer/id1/typeA/0
と
http://www.example.com/sendAnswer/id1/typeA/0/id2/typeB/1/id3/typeA/0
誰にもアイデアはありますか?