spring 2

[SpringBoot] @RequestParam๊ณผ @PathVariable ์ฐจ์ด

์˜จ๋ณด๋”ฉ ๊ณผ์ œ๋ฅผ ์ˆ˜ํ–‰ํ•˜๋‹ค๋ณด๋ฉด์„œ ๋Š๋‚€์ ์€ ์•„์ฃผ ๊ธฐ๋ณธ์ ์ธ ๊ฒƒ์—์„œ ์‹ค์ˆ˜ํ•˜๋Š” ์ผ์ด ์ƒ๊ฐ๋ณด๋‹ค ๋งŽ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค. ๋‹ค์‹œ๊ธˆ CS ๊ณต๋ถ€์˜ ์†Œ์ค‘ํ•จ์„ ๊นจ๋‹ซ๊ณ .. ์˜ค๋ฅ˜ํ•ด๊ฒฐ ๊ณผ์ •์„ ํฌ์ŠคํŒ…ํ•œ๋‹ค. Resolved org.springframework.web.bind.MissingServletRequestParamterException ์„œ๋ฒ„๋ฅผ ์‹คํ–‰ํ•˜๊ณ  API๋ฅผ ์‹คํ–‰ํ•˜๋‹ˆ ๋ฐ”๋กœ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค. ๊ทธ ์ด์œ ๋Š”.. PUT์œผ๋กœ mappingํ•œ๋‹ค๊ณ  ์ ์–ด๋†“๊ณ , @RequestParam์„ ๋‹น๋‹นํ•˜๊ฒŒ ์ ์€ ํƒ“์ด๋‹ค^^...@PutMapping์€ @PathVariable๋กœ ๋ฆฌ์†Œ์Šค id๋ฅผ ๋ฐ›์•„์•ผํ•œ๋‹ค. controller์—์„œ parameter๋ฅผ ๋ฐ›๋Š” ๋ฐฉ๋ฒ•์—๋Š” ์—ฌ๋Ÿฌ๊ฐ€์ง€๊ฐ€ ์žˆ๋‹ค. ๊ทธ ์ค‘ ๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” ๋‘ ๊ฐ€์ง€๋ฅผ ํ˜ผ๋ˆํ•  ์ค„์€ ๋ชฐ๋ž๋Š”๋ฐ... ๋‹ค์‹œ๋Š” ์ด๋Ÿฐ์‹ค์ˆ˜ ํ•˜์ง€์•Š๊ธฐ..

[RabbitMQ] ์ฒ˜์Œ ๋งŒ๋‚˜๋Š” rabbitMq + springboot + stomp : Message broker ์ดํ•ด

RabbitMQ๋ž€? ๋ฉ”์‹œ์ง€ ์ง€ํ–ฅ ๋ฏธ๋“ค์›จ์–ด(MOM)๋กœ์„œ, ๋ถ„์‚ฐ ์‹œ์Šคํ…œ์—์„œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ปดํฌ๋„ŒํŠธ ๊ฐ„์— ๋ฉ”์‹œ์ง€๋ฅผ ์•ˆ์ •์ ์ด๊ณ  ํ™•์‹คํ•˜๊ฒŒ ์ „์†กํ•˜๊ธฐ ์œ„ํ•ด ์„ค๊ณ„๋œ ์˜คํ”ˆ์†Œ์Šค ์†Œํ”„ํŠธ์›จ์–ด์ด๋‹ค. RabbitMQ๋Š” ๋‹ค์–‘ํ•œ ํ”„๋กœํ† ์ฝœ์„ ์ง€์›ํ•˜๋ฉฐ, ์ฃผ๋กœ AMQP(Advanced Message Queuing Protocol) ํ”„๋กœํ† ์ฝœ์„ ์‚ฌ์šฉํ•œ๋‹ค. AMQP๋Š” ๋ฉ”์‹œ์ง€ ์ง€ํ–ฅ ๋ฏธ๋“ค์›จ์–ด ์‹œ์Šคํ…œ์—์„œ ์•ˆ์ •์ ์ธ ๋ฉ”์‹œ์ง€ ์ „์†ก์„ ์œ„ํ•œ ํ‘œ์ค€ ํ”„๋กœํ† ์ฝœ๋กœ, RabbitMQ๋Š” ์ด ํ”„๋กœํ† ์ฝœ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ๋ฉ”์‹œ์ง€๋ฅผ ์ฃผ๊ณ  ๋ฐ›๋Š”๋‹ค. RabbitMQ๋Š” ํ(Queue)์™€ ๊ตํ™˜๊ธฐ(Exchange)๋ฅผ ์ค‘์‹ฌ์œผ๋กœ ๋™์ž‘ํ•˜๋Š”๋ฐ ๋ฉ”์‹œ์ง€๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ํ์— ๋ณด๋‚ด๋Š” ๊ฒƒ์„ '๋ฉ”์‹œ์ง€ ๋ฐœํ–‰(Publish)'์ด๋ผ๊ณ  ํ•˜๋ฉฐ, ํ๋กœ๋ถ€ํ„ฐ ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›์•„ ์ฒ˜๋ฆฌํ•˜๋Š” ๊ฒƒ์„ '๋ฉ”์‹œ์ง€ ๊ตฌ๋…(Subscribe)'์ด๋ผ๊ณ ..