[Spring] Swagger์—์„œ MultipartFile + DTO ๋™์‹œ ์š”์ฒญ ์‹œ application/octet-stream ์˜ค๋ฅ˜ ํ•ด๊ฒฐํ•˜๊ธฐ
ยท
Spring
Spring์—์„œ ํŒŒ์ผ๊ณผ JSON DTO๋ฅผ ๋™์‹œ์— ๋ฐ›๋Š” ๊ธฐ๋Šฅ์€ ์ƒ๊ฐ๋ณด๋‹ค ์ž์ฃผ ์‚ฌ์šฉ๋œ๋‹ค.๋‚˜ ์—ญ์‹œ ํŒŒ์ผ ์—…๋กœ๋“œ์™€ ํ•จ๊ป˜ ๋ฉ”ํƒ€ ์ •๋ณด๋ฅผ DTO๋กœ ์ „๋‹ฌ๋ฐ›์•„์•ผ ํ•˜๋Š” API๋ฅผ ๊ตฌํ˜„ํ•˜๋˜ ์ค‘, Swagger์—์„œ๋งŒ ์žฌํ˜„๋˜๋Š” ์ •์ฒด๋ถˆ๋ช…์˜ ์˜ค๋ฅ˜๋ฅผ ๋งˆ์ฃผํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค.Content-Type 'application/octet-stream' is not supported Swagger Multipart ์š”์ฒญ ์˜ค๋ฅ˜์ปจํŠธ๋กค๋Ÿฌ๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด ์ž‘์„ฑํ–ˆ์—ˆ๋‹ค.@PostMapping( value = "/files", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)public ResponseDto upload( @RequestPart("requestDto") RequestDto requestDto, ..