The error is shown in the figure:
Front-end code:
const pushdata=(postdata,callback)=>{
console.log(postdata)
axios.get(portUrl+ 'comments/putdata',postdata)
.then(()=>{
// location.reload()
}
)}
Back-end code (when you see @RequestBody, you know that the front-end sends a post in json format):
In fact, the reason is very simple, because it is a post request, you should change axios.get to axios.put.....