org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing

org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing

1:@requestBody这个标签在post 、put 方法中用于接收json格式的数据例如 @RequestBody TaxCalendarModel taxCalendarModel

export const editProduct = data =>ajax.put('/product/modify', data)

2:@requestParam这个标签接收的是key-value形式的参数。例如 @RequestParam(required = true) String id

 

export const editProduct = (id, fid, name,message) => ajax.put('/product/modify', {

   productId: id,

   flowId: fid,

   serverName: name,

   serverDescribe: message

})

发生这个错误有很大程度上是因为接值时候用的标签不对,不应该用@requestBody标签。

你可能感兴趣的:(前端,java)