欢迎光临
我们一直在努力

Content type ‘application/x-www-form-urlencoded;charset=UTF-8’ not supported解决

Spring报错:org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported,具体解决办法如下:

@PostMapping( "some/request/path" )
public void someControllerMethod( @RequestParam Map<String, String> body ) {
  //work with Map
}

参数前加@RequestParam。

参考:Content type ‘application/x-www-form-urlencoded;charset=UTF-8’ not supported for @RequestBody MultiValueMap

赞(0) 打赏
未经允许不得转载:Ddmit » Content type ‘application/x-www-form-urlencoded;charset=UTF-8’ not supported解决

评论 抢沙发

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

登录

找回密码

注册