0
クライアント要求の一部として、画像ファイルをSpring RestController
エンドポイントに提出する必要があります。Spring RestController提出ファイル
@RequestParam("file") MultipartFile file
とRestController
を使用することはできますか?
もしそうなら、例を示してください。
クライアント要求の一部として、画像ファイルをSpring RestController
エンドポイントに提出する必要があります。Spring RestController提出ファイル
@RequestParam("file") MultipartFile file
とRestController
を使用することはできますか?
もしそうなら、例を示してください。
はい、それは可能と非常に簡単です:
@RequestMapping("upload")
public void upload(@RequestParam("file") MultipartFile file){
//Do what you like with the file
}