SpringBoot 出现 Content type ‘application/x-www-form-urlencoded;charset=UTF-8‘ not supported
SpringBoot 出现 Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported
前端请求传Json对象的字符串则后端使用@RequestBody。
前端请求传Json对象则后端使用@RequestParam;
当前端请求的Content-Type是Json时,可以用@RequestBody这个注解来解决。@RequestParam 底层是通过request.getParameter方式获得参数的...
转载
2021-01-23 18:05:10 ·
220 阅读 ·
0 评论