Getting o.s.w.s.m.s.DefaultHandlerExceptionResolver.logException – Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content type ‘multipart/form-data;boundary=————————–917244744405307766670554;charset=UTF-8’ not supported]
for below code
@PostMapping(produces = MediaType.APPLICATION_JSON_VALUE,consumes =
MediaType.MULTIPART_FORM_DATA_VALUE,value = "/{userId}")
@Override
public ResponseEntity<WarrantyDetailsRequestResponse> createWarrantyDetails
(@RequestBody UsersWarrantyDetailsDTO usersWarrantyDetails,
@PathVariable("userId") Long userId,
@RequestParam("qrCodeImage") MultipartFile qrCodeImage,
@RequestParam("productInvoice") MultipartFile productInvoice,
@RequestParam("other_files") MultipartFile[] otherProductFiles) {
return new ResponseEntity<>(warrantyDetailsRequestResponse, HttpStatus.CREATED);
}
Sending multipart form data request from postman, handled all files data properly but still spring boot saying
Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content type ‘multipart/form-data;boundary=————————–917244744405307766670554;charset=UTF-8’ not supported]
please help.