当前位置:网站首页>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:36:00 【借一縷月光】
idea中,前端訪問localhost:8001/payment/create?serial=333,報下列錯誤 。
Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported]
原因分析:postman中發送請求:localhost:8001/payment/create?serial=333,類型是x-www-form-urlencoded;charset=UTF-8 ,而我們在後端裏使用了@RequestBody,只能接收前端傳過來的json數據。
解决方案:
方案一:去掉@RequestBody注解,可以采用@RequestParam接收就行,前端和後臺數據對應
方案二:在postman中就采用json格式
{
"serial":"12313",
"name":"韻昇初"
}
边栏推荐
- Ut2014 supplementary learning notes
- Leetcode刷题---217
- Jetson TX2 brush machine
- ThreadLocal原理及使用场景
- Leetcode刷题---283
- Knowledge map reasoning -- hybrid neural network and distributed representation reasoning
- [LZY learning notes -dive into deep learning] math preparation 2.5-2.7
- 6、 Data definition language of MySQL (1)
- Realize an online examination system from zero
- Ut2012 learning notes
猜你喜欢

Hands on deep learning pytorch version exercise solution - 2.6 probability

EFFICIENT PROBABILISTIC LOGIC REASONING WITH GRAPH NEURAL NETWORKS

丢弃法Dropout(Pytorch)

Hands on deep learning pytorch version exercise answer - 2.2 preliminary knowledge / data preprocessing

Matrix calculation of Neural Network Introduction (pytoch)

Tensorflow - tensorflow Foundation

Advantageous distinctive domain adaptation reading notes (detailed)

Tensorflow—Image segmentation

Preliminary knowledge of Neural Network Introduction (pytorch)

Pytorch ADDA code learning notes
随机推荐
20220602 Mathematics: Excel table column serial number
Softmax regression (pytorch)
二分查找法
Multi-Task Feature Learning for Knowledge Graph Enhanced Recommendation
丢弃法Dropout(Pytorch)
Leetcode skimming ---44
Knowledge map enhancement recommendation based on joint non sampling learning
20220604 Mathematics: square root of X
High imitation bosom friend manke comic app
GAOFAN Weibo app
Model selection for neural network introduction (pytorch)
Introduction to deep learning linear algebra (pytorch)
Knowledge map reasoning -- hybrid neural network and distributed representation reasoning
Synchronous vs asynchronous
[LZY learning notes dive into deep learning] 3.5 image classification dataset fashion MNIST
熵值法求权重
Leetcode刷题---263
conda9.0+py2.7+tensorflow1.8.0
Leetcode刷题---1385
6、 Data definition language of MySQL (1)