Also habe ich es mit unten versucht
Code: Select all
@RequestMapping(value = "/companies", method = RequestMethod.POST)
public void createCompany(@RequestBody CompanyDTO companyDTO, @RequestParam(value = "image", required = false) MultipartFile image){
.................
gebildet
Code: Select all
@RequestMapping(value = "/companies", method = RequestMethod.POST)
public void createCompany(@RequestParam("companyJson") String companyJson, @RequestParam(value = "image",required = false) MultipartFile image) throws JsonParseException, JsonMappingException, IOException{
CompanyDTO companyDTO = new ObjectMapper().readValue(companyJson, CompanyDTO.class);
.............................
Mobile version