1.1后台报错,
Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing
vue-admin-template在提交的时候,有相似的地方
export function getList(params) {return request({url: '/vue-admin-template/role/list',method: 'post',params})}export function addRole(params) {return request({url: '/vue-admin-template/role',method: 'post',params})}
1.2错误说明
后台需要一个json对象。
这里我是想添加一个角色,调用addRole(params)的时候,虽然method 使用post请求,可是在实际发送过程中,还是使用了get的方式,进行数据提交。
所以后台报错required request body is missing

1.3 修改办法:
如下将params 修改为data 就ok了

1.4 修改后的报文:
