问题一: JSON parse error: Cannot deserialize instance of java.util.ArrayList out of START_OBJECT toke
JSON parse error: Cannot deserialize instance of
java.util.ArrayList
out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance ofjava.util.ArrayList
out of START_OBJECT token
at [Source: (PushbackInputStream); line: 1, column: 1]
参数字段不匹配,比如我这里写的后端接口接受的参数是数组(@RequestBody List< String> customers),但是传参又是一个json数据,没对应好(如下图
数组应该这样子传
Content type ‘text/plain;charset=UTF-8’ not supported
只需要在请求的请求头上设置Content-Type为application/json就行
The error may involve defaultParameterMap
The error occurred while setting parameters
Cause: java.sql.SQLSyntaxErrorException: Duplicate column name ‘id’; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Duplicate column name ‘id’
连接了多个表都带有id,而我又为了省事直接select *,
要哪些数据就拿那些数据,而我只需要某一张表的字段加上其他表的几个字段就可以用select 表名.星,表名.字段获取
--结束END--
本文标题: 测试接口,发起请求时候报错JSON parse error: Cannot deserialize instance of java.util.ArrayList<java.lang.Object>
本文链接: https://lsjlt.com/news/403733.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-04-01
2024-04-03
2024-04-03
2024-01-21
2024-01-21
2024-01-21
2024-01-21
2023-12-23
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0