当前位置:网站首页>Content type ‘application/x-www-form-urlencoded; charset=UTF-8‘ not supported
Content type ‘application/x-www-form-urlencoded; charset=UTF-8‘ not supported
2022-07-03 10:33:00 【Borrow a ray of moonlight】
idea in , Front end access localhost:8001/payment/create?serial=333, Report the following error .
Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported]
Cause analysis :postman Send request in :localhost:8001/payment/create?serial=333, The type is x-www-form-urlencoded;charset=UTF-8 , And we used in the back end @RequestBody, Only the front-end can receive json data .
Solution :
Scheme 1 : Get rid of @RequestBody annotation , May adopt @RequestParam Just receive it , Front end and background data correspond
Option two : stay postman It is used in json Format
{
"serial":"12313",
"name":" Yunshengchu "
}
边栏推荐
- Neural Network Fundamentals (1)
- Leetcode刷题---202
- Are there any other high imitation projects
- 20220608 other: evaluation of inverse Polish expression
- 权重衰退(PyTorch)
- Leetcode刷题---44
- 一步教你溯源【钓鱼邮件】的IP地址
- 2018 Lenovo y7000 black apple external display scheme
- Ut2017 learning notes
- Label Semantic Aware Pre-training for Few-shot Text Classification
猜你喜欢
A super cool background permission management system
The imitation of jd.com e-commerce project is coming
Realize an online examination system from zero
I really want to be a girl. The first step of programming is to wear women's clothes
MySQL报错“Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre”解决方法
What can I do to exit the current operation and confirm it twice?
ECMAScript -- "ES6 syntax specification # Day1
openCV+dlib实现给蒙娜丽莎换脸
Flutter 退出当前操作二次确认怎么做才更优雅?
Out of the box high color background system
随机推荐
Leetcode - 706 design hash mapping (Design)*
[graduation season] the picture is rich, and frugality is easy; Never forget chaos and danger in peace.
Ind yff first week
High imitation wechat
Leetcode-112:路径总和
Leetcode-112: path sum
Implementation of "quick start electronic" window dragging
Leetcode刷题---263
20220606数学:分数到小数
Data preprocessing - Data Mining 1
Leetcode刷题---1385
Judging the connectivity of undirected graphs by the method of similar Union and set search
The imitation of jd.com e-commerce project is coming
Leetcode - 1172 plate stack (Design - list + small top pile + stack))
Notes - regular expressions
Anaconda installation package reported an error packagesnotfounderror: the following packages are not available from current channels:
MySQL报错“Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre”解决方法
Ut2015 learning notes
Are there any other high imitation projects
Configure opencv in QT Creator