I am trying to store a name of a image, and 2 drop down values into a String array list and then pass it as a array list to my controller in spring.It works with json and string but never an array list yet
@PostMapping(value = "/saveData")public ModelAndView save(@RequestBody String
choices,@ModelAttribute Datadata,Modelmodel){
System.out.println(choices.toString());
EDIT: Its in json just so I could test that values were coming in. Now I just need them 2 be an array list
js
$.ajax(url, {
data: JSON.stringify(choices2),
datatype : "application/String[]",
contentType: "text/plain",
type: 'POST'
});