[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, ..