I have a Java 11 application using spring boot.
I have this request in my request controller :
@RestController
public class ImportController {
private static final Logger LOGGER = LoggerFactory.getLogger(ImportController.class);
@PostMapping("/import")
public ResponseEntity<List<CompareAnalysis>> importXML(@RequestParam("files") List<MultipartFile> files) {
LOGGER.debug("issue here" + files.size());
...
}
}
After generating my war I put it in my Tomcat Vanilla 9.0.45.
When I try to call my application like this: curl -X POST -F 'files=@toto.pdf' http://localhost:8080/import/
, I always have in my logs :
17:22:33.461 [http-nio-8080-exec-3] DEBUG my.app.controler.ImportController - issue here 0
I don't know where I lose my multipart file...