现象:

前端JS报错JSON parse error: Unrecognized token

 

 "JSON parse error: Unrecognized token 'form': was expecting 'null', 'true', 'false' or NaN; nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'form': was expecting 'null', 'true', 'false' or NaN↵ at [Source: (PushbackInputStream); line: 1, column: 6]"

原因:

axios({
  method: 'post',
  url: '/user/12345',
  data: {  //这个地方stringfy什么的东西删除试试
    firstName: 'Fred',
    lastName: 'Flintstone'
  }
});

 

相关文章: