Postman调试时报错:Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token。

原因:需要的是集合,但是传入的参数外面包装了一个对象。

public Map addAddress(@RequestBody List records) {​​​​​​​}

解决方式:把对象用数组的格式进行传递。

[{"id": "606863377499837444","createdBy": "601157755265372302","created": "2023-06-02 14:59:14","lastUpdated": "2023-06-02 14:59:14","lastUpdatedBy": "601157755265372302",}]