Kontroler:
@ResponseBody
@RequestMapping(value = "/save", method = RequestMethod.POST)
public String save(StressTest stressTest) {
//dosomething
return "ok";
}
Klasa bindowania:
Class StressTest {
private Map<String,List<String>> methods;
private String serviceName;
...
}
Pytaniem jest: Jak napisać formularz html, mój pakiet http post:
methods["GetSome"].[0].value=ds&methods["GetSome"].[1].value=asaaaaa&serviceName=aa
Ale bind fail w springmvc, Lista w metodach zawsze pustych
Odpowiedzi:
0 dla odpowiedzi № 1Wysłane dane nie są poprawne. Pozbyć się czegoś .wartość część
Spróbuj to zrobić:
methods["GetSome"].[0]=ds&methods["GetSome"].[1]=asaaaaa&serviceName=aa
0 dla odpowiedzi nr 2
Użyj metod ["GetSome"] [0] = ds. Jeśli używasz listy, użyj metod ["GetSome"] [0] .someMember.