我通常會檢索POST參數如下所示:當Spring中的某些URL在URL中時,POST參數如何處理?
@RequestMapping(method = RequestMethod.POST)
public ModelAndView create(
@RequestParam(value = "first_name", required = false) String firstName,
HttpServletRequest request
) {
但是,如果一些參數是一樣http://example.com/post/path?last_name=Smith
的網址是什麼?當RequestMapping
是POST時,Spring是否應該從URL和POST數據中獲取所有參數?
基本上,Facebook通過POST和其他參數(如request_ids)通過URL參數同時發送signed_request參數。我需要得到兩個。
嗯......我的問題的重點是,如果Spring從POST和URL中獲取參數。 'first_name'在POST中,'last_name'在URL中。 –
是的,spring會從Form:input和url中獲取參數。 – Kent