It's my controller in spring boot
@RequestMapping(value = "/test", method = RequestMethod.POST, consumes = "multipart/form-data")
@ResponseBody
public ResponseEntity<?> test(
@RequestParam("enveloppe") Enveloppe enveloppe,
@RequestParam("files") MultipartFile[] uploadFiles) {
}
It's my service in angularJs
var fd = new FormData();
angular.forEach(files, function(file) {
fd.append('files', file);
})
fd.append('enveloppe', enveloppe, {type :'application/xml'} );
$http.post("/test", fd, {
transformRequest : angular.identity,
headers : {
'Content-Type' : undefined
}
My object "enveloppe" generated automatically by xsd in spring boot. my object "enveloppe" in angularjs converted by json2Xml lib to have xml. But, spring boot cant' wrapper the object enveloppe. ~
1 ) it's possible to do that ?