๋ฐ˜์‘ํ˜•

@RequestParam 415 ์˜ค๋ฅ˜ 1

[Springboot] Http Status 415 error ์˜ค๋ฅ˜ (415 Unsupported Media Type)

Intro ์•ˆ๋…•ํ•˜์„ธ์š”. Springboot ๋ฅผ ์‚ฌ์šฉํ•˜๋˜ ๋„์ค‘ Http Status 415 error ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์˜€์Šต๋‹ˆ๋‹ค. 415 Unsupported Media Type Why? ๊ธฐ์กด ์ปจํŠธ๋กค๋Ÿฌ์—์„œ ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ๋ฐ›๊ธฐ ์œ„ํ•ด @RequestParam ์–ด๋…ธํ…Œ์ด์…˜์„ ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค. ๋งค๊ฐœ๋ณ€์ˆ˜ 5๊ฐœ๋ฅผ ๋ฐ›๊ณ  ์žˆ๋˜ ํ„ฐ๋ผ ์ƒ๋‹นํžˆ ๋ณต์žกํ•ด ๋ณด์—ฌ ํ•ด๋‹น ๋งค๊ฐœ๋ณ€์ˆ˜๋“ค์„ ํ•˜๋‚˜์˜ Dto Req ๊ฐ์ฒด๋กœ ๋ฐ”๊ฟ”์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค. ์ดํ›„ ์ฝ”๋“œ ์‹คํ–‰์„ ํ–ˆ๋Š”๋ฐ, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. Springboot ๋ฅผ ์ž˜ ๋ชฐ๋ผ์„œ, ํ•ด๋งธ์ง€๋งŒ ์ €ํฌ์—๊ฒ ๊ตฌ๊ธ€๋‹˜์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๐Ÿคง !! ๊ตฌ๊ธ€๋ง ํ›„, ์ œ๊ฐ€ ์‚ฌ์šฉํ•œ ์–ด๋…ธํ…Œ์ด์…˜์ด ์ž˜๋ชป ๋˜์—ˆ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. @RequestParam ๋Š” ๋‹จ์ผ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›๊ธฐ ์œ„ํ•ด์„œ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์—, ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์—ฌ๋Ÿฌ ๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ€ ๋“ค์–ด..

๋ฐ˜์‘ํ˜•