admin管理员组

文章数量:1794759

Spring MVC Content type 'application/x

Spring MVC Content type 'application/x

这是很久之前遇到的一个问题,大概是前台传递JSON,后台无法正常接收。

这里记录一下解决方法:

通过consumes 指定处理请求的提交内容类型(Content-type)。

@PostMapping(value = "/book/set/",consumes = "application/json")

本文标签: contentMVCspringtypeApplication