問題場景:
今天在看公司代碼的時候,發現controller中,存在兩個方法,分別注解如下:
@RequestMapping(value = "/get", method = RequestMethod.GET),
@RequestMapping(value = "/get", method = RequestMethod.POST),這里value值相同,但是method不同,在原來的開發工作中中沒有遇到過這種情況,記錄一下~~
問題分析:
查了一部分資料,發現value值如果相同,則需要指定method不同。
原理:
有時間補充~~