Я нашел решение: -
var myMap = new Map();
myMap.set('1', 'value1');
myMap.set('2', 'value2');
myMap.set('3', 'value3');
myMap.set('4', 'value4');
//Making JS Map compatible for JSON.Stringify
const out = Object.create(null)
myMap.forEach((value, key) => {
if (value instanceof Map) {
out[key] = map_to_object(value)
}
else {
out[key] = value
}
})
$.ajax({
type : "POST",
url : "/yourURL",
contentType: "application/json",
data : JSON.stringify(myMap) //......
@RequestMapping(value = "/yourURL", method = RequestMethod.POST, consumes="application/json")
@ResponseBody
public List<String> reqControl(@RequestBody Map<String,<String> myMap) {
// further code.
}