Есть контроллер
@RestController
public class HandlerRequest {
@GetMapping("/schedule")
@RequestMapping(method = RequestMethod.POST)
@ResponseBody
public List<Meeting> build(@RequestBody List<BookingRequest> bookingRequests, @RequestBody String workTime) {
return Builder.build(bookingRequests, workTime);
}
Отправляю json через Postman
{
"bookingRequests" : [] ,
"workTime" : "1130 1730"
}
В ответ приходит
{
"timestamp": 1507146731039,
"status": 400,
"error": "Bad Request",
"message": "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 of java.util.ArrayList out of START_OBJECT token\n at [Source: (PushbackInputStream); line: 1, column: 1]",
"path": "/schedule"
}