报错代码
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Get infos</title>
</head>
<body>
<form action="/test" method="post" enctype="multipart/form-data ">
<input type="file" name="file"/>
<input type="text" name="imageName"/>
<input type="submit"/>
</form>
</body>
</html>
Controller
@PostMapping(path = "/test", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public EntityInfo createNewEntityWithImage(@RequestParam String imageName, @RequestParam("file") MultipartFile file) throws IOException {
try (InputStream inputFileData = file.getInputStream()) {
System.out.println("createNewEnti