1. 错误描述
1.1 后端报错
HttpMessageNotReadableException: Required request body is missing
1.2 浏览器报错
“status“: 400, “error“: “Bad Request“
2. 原因
当前端使用Get请求方式发送含参请求时,后端Controller接收参数时不同使用@RequesrBody注解。而应该使用如下方式:
@GetMapping("/info")
@ApiOperation("通过用户token获取用户信息接口")
@ApiImplicitParam(name = "token", value = "令牌", dataType = "string")
public Object login_get_info(String token){
// ...
}