org.springframework.web.HttpMediaTypeNotSupportedException: Content-Type ‘text/plain;charset=UTF-8‘

张开发
2026/4/14 18:16:53 15 分钟阅读

分享文章

org.springframework.web.HttpMediaTypeNotSupportedException: Content-Type ‘text/plain;charset=UTF-8‘
问题解决方案解决方案在 Postman 中修改设置保持选择 “raw”将右侧下拉框从 “Text” 改为 “JSON”确保 Body 内容是有效的 JSON{ id: 101 }这样 Postman 会自动设置 Content-Type: application/json请求就能正常处理了。

更多文章