That's one way to do this, on Spring side
@PostMapping("api/user")
public Response theAction(@RequestBody List<User> users)on the javascript side,
let data = JSON.stringify([{name: 'dddddd'}, {name: 'bbbbb'}]);
axios.post("/user/update/social-accounts", data, {
headers: {
"Content-Type": "application/json", // very important
},
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});