The official documentation describes what to do if you need to get both json and multipart data from a request:
@PostMapping("/")public String handle(@RequestPart("meta-data") MetaData metadata, @RequestPart("file-data") MultipartFile file) { // ...}
The official documentation describes what to do if I need to get both json and multipart data from a request. But what to do if i need an array of such objects?Can we make something like this work:
public record Data(MetaData metadata, List<MultipartFile> files) {}@PostMapping("/")public String handle(Set<Data> data) { // ...}
Is it even possible? Or maybe some kind of workaround?And in the end how to test it using Postman?