简单记录一下 ,我本地开发环境这样写测试时没有问题,
@ApiOperation(value="取消关注")
@PostMapping("cancelFollow")
public R cancelFollow(@RequestBody CancelFollowVo cancelFollowVo) {
}
当我部署到服务器上时测试出现了这个问题
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@e5457c0]
org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Invalid UTF-8 start byte 0xbd; nested exception is com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 start byte 0xbd
at [Source: (PushbackInputStream); line: 1, column: 3]
JSON parse error: Invalid UTF-8 start byte 0xbd;
我加上这个application/json;charset=UTF-8
就好了。。。
@ApiOperation(value="取消关注")
@PostMapping(value = "cancelFollow",produces = "application/json;charset=UTF-8")
public R cancelFollow(@RequestBody CancelFollowVo cancelFollowVo) {
}