のスクリプトArray
をint
に渡したいと思いSpring Controller
ます。しかし、私は得続けます
400 bad request.
私のjs array
場合
array = [1,2,3,4]
array -> 400 bad request
JSON.Stringify(array) -> I will get [1,2,3,4]
$.ajax({//jquery ajax
data:{"images": array},
dataType:'json',
type:"post",
url:"hellomotto"
....
})
string List
..をループすると、最初の要素は'[1'
@RequestMapping(value = "/hellomotto", method = Request.POST)
public void hellomotto(@RequestParam("images") List<String> images){
sysout(images); -> I will get [1,2,3,4]
}
パブリックボイド
どうすればこれを適切に行うことができますか?いろいろ組み合わせてみました