Loading...
2020. 5. 20. 11:13

[Spring boot] Spring Data Rest๋ฅผ ์ด์šฉํ•œ REST API ๊ฐœ๋ฐœ 1

MVC ํŒจํ„ด์— ์ด์–ด์„œ, ์ด๋ฒˆ์—๋Š” Spring Data Rest๋ฅผ ์ด์šฉํ•˜์—ฌ REST API ์„œ๋ฒ„๋ฅผ ๊ฐœ๋ฐœํ•˜๋Š” ์‹œ๊ฐ„์„ ๊ฐ€์ ธ๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. MVC ํŒจํ„ด์—์„œ๋Š” Domain, Controller, Repository ์ด๋ ‡๊ฒŒ 3๊ฐ€์ง€๋ฅผ ์ด์šฉํ•˜์˜€๊ณ , ์ถ”๊ฐ€๋กœ Service ํด๋ž˜์Šค๋ฅผ ๊ตฌํ˜„ํ•˜๋ฉด ๋”์šฑ ์„ธ๋ถ€์ ์ธ ์ฒ˜๋ฆฌ๊ฐ€ ๊ฐ€๋Šฅํ•˜๋„๋ก ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. Spring Data Rest๋Š” VC๋ฅผ ์ƒ๋žตํ•˜๊ณ , ์˜ค์ง Domain๊ณผ Repository๋งŒ์„ ๊ฐ€์ง€๊ณ  ์•„์ฃผ ์‰ฝ๊ฒŒ REST API ์„œ๋ฒ„๋ฅผ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•œ ๋ฒˆ ์‹œ์ž‘ํ•ด๋ณด๋„๋ก ํ•˜์ฃ . ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์ค€๋น„ ๊ธฐ์กด์˜ MVC ํŒจํ„ด์„ ์‚ฌ์šฉํ–ˆ๋˜ ๋””ํŽœ๋˜์‹œ์—์„œ ์ผ๋ถ€ ๋ณ€๊ฒฝํ•˜์—ฌ, Rest Repositores ์„ ํƒํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค. Spring Data Rest์—์„œ๋Š” base-path๋ฅผ ์ง€์ •ํ•˜์—ฌ ๋ชจ๋“  A..

2020. 5. 19. 21:47

[Spring boot] MVC ํŒจํ„ด์„ ์ด์šฉํ•œ REST API ๊ฐœ๋ฐœ

์ง€๋‚œ ํฌ์ŠคํŠธ์—์„œ REST API๊ฐ€ ๋ฌด์—‡์ธ์ง€, ์–ด๋–ป๊ฒŒ ์„ค๊ณ„๋ฅผ ํ•ด์•ผํ•˜๋Š”์ง€์— ๋Œ€ํ•ด์„œ ๋‹ค๋ค„๋ดค์Šต๋‹ˆ๋‹ค. REST API๋Š” HTTP Method๋ฅผ ์ด์šฉํ•˜์—ฌ ํ–‰์œ„๋ฅผ ์ •ํ•˜๊ณ , URI๋ฅผ ์ด์šฉํ•ด์„œ ๋ฆฌ์†Œ์Šค๋ฅผ ์ •ํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ๋™์ž‘ํ•˜๋Š” ์„œ๋ฒ„์˜€๋Š”๋ฐ์š”. ์ด๋ฒˆ ํฌ์ŠคํŠธ์—์„œ๋Š” MVC ํŒจํ„ด + Spring boot 2.x ์กฐํ•ฉ์„ ์ด์šฉํ•˜์—ฌ ๊ฐ„๋‹จํ•œ REST API ์„œ๋ฒ„๋ฅผ ๊ฐœ๋ฐœํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. What is MVC ? MVC ํŒจํ„ด์— ๋Œ€ํ•ด์„œ๋Š” ์•„๋ž˜์˜ ๊ธ€์—์„œ ๋‹ค๋ค„ ๋ณธ์ ์ด ์žˆ๋Š”๋ฐ์š”. ํ˜น์‹œ MVC ํŒจํ„ด์— ๋Œ€ํ•ด ๋‹ค์‹œ ๋ณต์Šตํ•ด๋ณด์‹œ๊ฑฐ๋‚˜, ์ž˜ ๋ชจ๋ฅด์‹ ๋‹ค๋ฉด, ์•„๋ž˜์˜ ๊ธ€์„ ๋ณด์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค. 2016/12/29 - [Programming/JavaFX] - MVC Pattern์— ๊ธฐ๋ฐ˜ํ•œ GUI ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ JavaFX MVC Pattern์— ๊ธฐ๋ฐ˜ํ•œ GUI ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ..

2020. 5. 19. 18:40

[Spring boot] REST API์˜ ๊ธฐ์ดˆ์™€ ์„ค๊ณ„

Spring boot๊ฐ€ ๊ธฐ์กด์˜ Spring์— ๋น„ํ•ด ๋‹ค์–‘ํ•œ ์„ค์ •๋“ค์„ ์ž๋™ํ™” ์‹œ์ผœ ๊ฐœ๋ฐœ์ž๊ฐ€ ์„ค์ •ํ•ด์•ผ ํ•  ๋ถ€๋ถ„์„ ์ค„์ด๊ณ , ์ž„๋ฒ ๋””๋“œ ํ†ฐ์บฃ์„ ํƒ‘์žฌํ•˜์—ฌ ๋” ์‰ฌ์šด ๊ฐœ๋ฐœ๋“ค์ด ๊ฐ€๋Šฅํ•ด์กŒ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ์•˜์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ ํฌ์ŠคํŠธ์—์„œ๋Š” Spring boot๋กœ ์„œ๋ฒ„๋ฅผ ๊ฐœ๋ฐœํ•ด๋ณด๋Š” ์ฒซ ๋‹จ์ถ”์ธ REST API์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. What is REST API ? REST API๋ž€, REST(Representational State Transfer)์˜ ์•ฝ์ž๋กœ '๋Œ€ํ‘œ์ ์ธ ์ƒํƒœ ์ „๋‹ฌ'์ด๋ผ๋Š” ์˜๋ฏธ๋ฅผ ๋‹ด๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์›น๊ณผ ๊ฐ™์€ ๋ถ„์‚ฐ ํ•˜์ดํผ๋ฏธ๋””์–ด ์‹œ์Šคํ…œ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ํ†ต์‹  ๋„คํŠธ์›Œํฌ ์•„ํ‚คํ…์ฒ˜๋ผ๊ณ  ๋ณด์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๋ณธ๋ž˜ ์›น์€ ์ „์†ก ๋ฐฉ์‹์œผ๋กœ HTTP ํ”„๋กœํ† ์ฝœ์„, ์‹๋ณ„ ๋ฐฉ๋ฒ•์œผ๋กœ URI๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๋ฐ, ์—ฌ๊ธฐ์„œ ํ˜ผ๋™ํ•˜๋ฉด ์•ˆ๋˜๋Š” ๊ฒƒ์€ URL๊ณผ URI๋Š” ๋‹ค๋ฆ…..

2020. 4. 23. 12:50

[Spring boot] Spring boot test starter๋ฅผ ์ด์šฉํ•œ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ž‘์„ฑ

์ง€๋‚œ ํฌ์ŠคํŠธ์—์„œ ์ž ๊น, ํ…Œ์ŠคํŠธ ์ฝ”๋“œ์— ๋Œ€ํ•ด ๋‹ค๋ค„๋ดค์—ˆ์Šต๋‹ˆ๋‹ค. ํ…Œ์ŠคํŠธ ์ฝ”๋“œ๋ฅผ ์ด์šฉํ•˜๋ฉด, ํ™•์‹คํžˆ Postman์ด๋‚˜ Curl๊ณผ ๊ฐ™์€ ํ…Œ์ŠคํŠธ ๋„๊ตฌ์—†์ด๋„ ์ž๋™ํ™” ๋œ ํ…Œ์ŠคํŠธ ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์ด์šฉํ•ด์„œ ์‰ฝ๊ฒŒ ํ…Œ์ŠคํŠธ๋ฅผ ํ•  ์ˆ˜ ์žˆ์—ˆ์ฃ . ์‹ค์ œ๋กœ ํ…Œ์ŠคํŠธ ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์ด์šฉํ•œ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ๊ตฌํ˜„์€ ํ˜„์—…์—์„œ ๋งŽ์ด ์ด์šฉํ•ฉ๋‹ˆ๋‹ค. ๋‹จ์ˆœํ•˜๊ฒŒ ๋‚ด๊ฐ€ ๊ตฌํ˜„ํ•œ ๊ธฐ๋Šฅ ํ•œ ๋‹จ์œ„๋งŒ ํ…Œ์ŠคํŠธ๋ฅผ ํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹Œ ์ข…ํ•ฉ์ ์œผ๋กœ ํ…Œ์ŠคํŠธํ•  ๋•Œ๋Š” ์ด๋Ÿฌํ•œ ์ž๋™ํ™”๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ํŠนํžˆ ํ”„๋กœ์ ํŠธ๊ฐ€ ์ปค์ง€๊ณ , ๊ทธ ๊ทœ๋ชจ๊ฐ€ ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ๊ธ‰์ด ๋˜๋ฉด ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ฝ”๋“œ๋„ ๋ฐฉ๋Œ€ํ•ด์ง€๊ณ , ๊ทธ๋ ‡๊ฒŒ ๋˜๋ฉด ํ…Œ์ŠคํŠธํ•ด์•ผ ํ•  ํ•จ์ˆ˜๋„ ๋งŽ์•„์ง€๊ฒ ์ฃ . Spring boot Test Spring boot์—์„œ๋Š” ๊ธฐ๋ณธ์ ์ธ ํ…Œ์ŠคํŠธ ์Šคํƒ€ํ„ฐ๋ฅผ ์ œ๊ณตํ•˜๋Š”๋ฐ, ์ด ๋ชจ๋“ˆ์—๋Š” Junit ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ์™ ๋งŒํ•œ Java ๊ณ„์—ด์˜ ์–ธ์–ด์—์„œ ์‚ฌ์šฉ..

2020. 4. 22. 12:23

[Spring boot] ๋‚˜๋งŒ์˜ ํ™˜๊ฒฝ ์„ค์ • ๋งŒ๋“ค๊ธฐ

์ง€๋‚œ ํฌ์ŠคํŠธ์—์„œ ์ž๋™ ํ™˜๊ฒฝ ์„ค์ •๊ณผ ๊ฐœ๋ฐœ, ํ”„๋กœ๋•์…˜, ํ…Œ์ŠคํŠธ ํ™˜๊ฒฝ์„ ๋‚˜๋ˆ„๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ํฌ์ŠคํŒ…ํ•˜์˜€์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ ํฌ์ŠคํŠธ๋Š” ๊ทธ๊ฑฐ์— ์ด์–ด์„œ, ๋‚˜๋งŒ์˜ ํ™˜๊ฒฝ ์„ค์ • ํŒŒ์ผ์„ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. @Value ์šฐ๋ฆฌ๋Š” ํ™˜๊ฒฝ์„ค์ •์—์„œ Property์˜ ํ‚ค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŠน์ •ํ•œ ๊ฐ’์„ ํ˜ธ์ถœํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด Key๋กœ ์šฐ๋ฆฌ๊ฐ€ ๋ฌด์—‡์„ ํ•  ๊ฒƒ์ธ์ง€๋ฅผ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ฝ”๋“œ์—์„œ ๊ตฌํ˜„ํ•ด์•ผ ํ•˜๋ฉฐ, ์ผ๋‹จ ๊ทธ๋Ÿฌ๊ธฐ ์œ„ํ•ด์„œ๋Š” ์šฐ๋ฆฌ๋Š” ์ด ๊ฐ’์„ ์–ด๋–ป๊ฒŒ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ๋Š”์ง€๋ฅผ ์•Œ์•„์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿด ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด @Value ์–ด๋…ธํ…Œ์ด์…˜์ž…๋‹ˆ๋‹ค. # application.yml server: port: 8080 spring: profiles: active: dev property: app: hello: hello world ๋จผ์ € ์šฐ๋ฆฌ๋Š” ์„œ๋ฒ„์˜ ..

2020. 4. 21. 12:18

[Spring boot] ํ™˜๊ฒฝ ์„ค์ •์˜ ๋™์ž‘ ์›๋ฆฌ์™€ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ํ™˜๊ฒฝ ๋‚˜๋ˆ„๊ธฐ

Spring boot ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ๋‚œ ํ›„, Embedded Tomcat์„ ์ด์šฉํ•ด ์‰ฝ๊ฒŒ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‹œ์ž‘ํ•ด๋ณด๊ณ , ํ…Œ์ŠคํŠธํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ ๊นŒ์ง€๋Š” ์ข‹์€ ๊ฒƒ์ด๊ธด ํ•œ๋ฐ, Embedded Tomcat์— ๋Œ€ํ•œ ํฌํŠธ ์ฃผ์†Œ ๋“ฑ์˜ ์„ค์ •์€ ์–ด๋–ป๊ฒŒ ํ•˜๋Š” ๊ฒƒ์ผ๊นŒ? Property ๊ธฐ์กด์˜ Spring์—์„œ๋Š” ๋ชจ๋“  ์„ค์ •์„ XML ํŒŒ์ผ๋กœ ์‚ฌ์šฉํ–ˆ๋‹ค๋ฉด, Spring boot์—์„œ๋Š” Embedded Tomcat, Application ์„ค์ • ๊ด€๋ จ ๋ฐ ๊ธฐํƒ€ ์ •์ ์ธ ๊ฐ’์„ ํ‚ค ๊ฐ’ ํ˜•์‹์œผ๋กœ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค. Spring boot ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•˜๋ฉด, ์ž๋™ ๋งŒ๋“ค์–ด์ง€๋Š” application.properties๋Š” ์ด๋Ÿฌํ•œ ์„ค์ •์„ ํ•ด์ฃผ๋Š” ํŒŒ์ผ์ž…๋‹ˆ๋‹ค. ํ˜„์žฌ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‹คํ–‰ํ•˜๋ฉด 8080 ํฌํŠธ๋กœ ์„ค์ •๋˜์ง€๋งŒ, ์ด ํฌํŠธ ์ฃผ์†Œ๋ฅผ ๋ฐ”๊พธ๊ณ  ์‹ถ๋‹ค๋ฉด, ์•„๋ž˜์™€ ๊ฐ™์ด ์„ค์ •์„..

2020. 4. 21. 10:59

[Spring boot] ๋‹ค์–‘ํ•œ ์–ด๋…ธํ…Œ์ด์…˜์„ ํ™œ์šฉํ•œ HTTP API ๊ตฌํ˜„

์ง€๋‚œ ํฌ์ŠคํŠธ์—์„œ IntelliJ IDEA๋ฅผ ์ด์šฉํ•˜์—ฌ Spring boot ํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“œ๋Š” ์‹œ๊ฐ„์— ๋Œ€ํ•ด ์•Œ์•„๋ดค์Šต๋‹ˆ๋‹ค. ํ™•์‹คํžˆ ๊ธฐ์กด์˜ Spring์— ๋น„ํ•˜์—ฌ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ์ ˆ์ฐจ๊ฐ€ ๊ฐ„๋‹จํ•˜๊ณ , ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ค์ •๋„ ๊นŒ๋‹ค๋กญ์ง€ ์•Š์€ ๋ชจ์Šต์ด์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ ํฌ์ŠคํŠธ์—์„œ๋Š” ๊ทธ์— ์ด์–ด์„œ ๊ฐ„๋‹จํ•œ HTTP API๋ฅผ ๊ตฌํ˜„ํ•˜๋Š” ์‹œ๊ฐ„์„ ๊ฐ€์ ธ๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. Hello World ๊ฐ€์žฅ ๋จผ์ € ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ์ œ๋Œ€๋กœ ์‹คํ–‰๋˜๋Š”์ง€ ํ…Œ์ŠคํŠธํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ์–ด๋–ค ๋ฌธ๊ตฌ๋ฅผ ์ถœ๋ ฅํ•ด๋ณด๋Š” ๋ฐฉ๋ฒ•์ด ๊ฐ€์žฅ ์ข‹๊ฒ ์ฃ ? REST API์—์„œ ํŒŒ๋ผ๋ฏธํ„ฐ๋„ ๋ฐ›์ง€ ์•Š๊ณ , ๊ฐ€์žฅ ๊ฐ„๋‹จํ•œ ๋ฉ”์†Œ๋“œ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” GET ๋ฉ”์†Œ๋“œ๋ฅผ ์ด์šฉํ•ด Hello World๋ฅผ ์ถœ๋ ฅํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. package xyz.neonkid.blogexample import org.springframework..

2020. 4. 21. 10:33

[Spring boot] IntelliJ IDEA๋ฅผ ์ด์šฉํ•œ Spring boot ํ”„๋กœ์ ํŠธ ์‹œ์ž‘

๊ธฐ์กด์˜ Java ์–ธ์–ด๋ฅผ ์ด์šฉํ•ด์„œ ์›น ๊ฐœ๋ฐœ์„ ์œ„ํ•ด์„œ๋Š” Tomcat, Jetty ๋“ฑ๊ณผ ๊ฐ™์€ Servlet Container๋ฅผ ์„ค์น˜ํ•˜๊ณ , ํ”„๋กœ์ ํŠธ ๋‚ด์— ํ™˜๊ฒฝ์„ ๊ตฌ์„ฑํ•ด์•ผ ํ–ˆ๊ณ , ๋Œ€ํ‘œ์ ์ธ Java Application Framework์ธ Spring ์—ญ์‹œ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ค์ •์ด ๋งŒ๋งŒ์น˜ ์•Š๋‹ค๋Š” ์ด์œ ๋กœ Java ์–ธ์–ด๋ฅผ ์ž˜ ์‚ฌ์šฉํ•˜๋Š” ๋ถ„์ด ์•„๋‹Œ ๋ถ„๋“ค์€ ๋Œ€๋ถ€๋ถ„ ์›น ๊ฐœ๋ฐœ์„ ์œ„ํ•ด ๋น„๊ต์  ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ค์ •์ด ์‰ฌ์šด Node.js์˜ Express๋‚˜ Python์˜ Django ๋“ฑ์„ ๋งŽ์ด ์‚ฌ์šฉํ•˜์ฃ . Spring boot Spring boot๋Š” ์ด๋Ÿฌํ•œ Spring์˜ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ค์ •์˜ ์–ด๋ ค์›€๊ณผ ๋ถ€๋‹ด์„ ๋œ์–ด์ฃผ๊ธฐ ์œ„ํ•ด ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ค์ •์„ ์ตœ์†Œํ™” ํ•˜๊ณ , ๊ฐœ๋ฐœ์ž๊ฐ€ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์— ์ง‘์ค‘ํ•  ์ˆ˜ ์žˆ๋„๋ก ๋„์™€์ค๋‹ˆ๋‹ค. ๋จผ์ € Spring boot์˜ ํŠน์ง•๋ถ€ํ„ฐ ๊ฐ„๋‹จํžˆ..

2020. 4. 6. 13:41

[Algorithm] - 2019 Kakao Winter internship Coding test ๋ฌธ์ œ ํ’€์ด

2๋…„ ์ „๋ถ€ํ„ฐ ๊ณ„์†, ์‹œ๊ฐ„์ด ๋‚  ๋•Œ๋งˆ๋‹ค(๊ทธ ์‹œ๊ฐ„์ด ์–ผ๋งˆ ๋˜์ง€ ์•Š์ง€๋งŒ..) ํ‹ˆํ‹ˆ์ด ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ฌธ์ œ ํ’€์ด๋ฅผ ๊ณ„์† ์ด์–ด๊ฐ€๊ณ  ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์–‘ํ•œ ๋ฌธ์ œ๋“ค์„ ๋ณด์•˜๊ณ , ์–ด๋ ค์šด ๋ฌธ์ œ, ์ƒ๊ฐ์ด ๋‚  ๊ฒƒ ๊ฐ™์œผ๋ฉด์„œ๋„ ๋‡Œ์ •์ง€๊ฐ€ ์˜ค๋Š” ๋ฌธ์ œ, ์‰ฝ๊ฒŒ ํ’€๋งŒํ•œ ๋ฌธ์ œ๋“ค ๋‹ค์–‘ํ•œ ๋ฌธ์ œ๋“ค์ด ์กด์žฌํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋˜ ์ค‘, ์ž‘๋…„ ๊ฒจ์šธ์— ์žฌ๋ฏธ์‚ผ์•„ ์นด์นด์˜ค ์ฝ”๋”ฉ ํ…Œ์ŠคํŠธ ๋ฌธ์ œ๋ฅผ ํ’€๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋ฌธ์ œ ๋‚œ์ด๋„๋Š” ์ƒ๊ฐํ•œ ๊ฒƒ๋ณด๋‹ค๋Š” ์กฐ๊ธˆ ์–ด๋ ค์šด ์ˆ˜์ค€์— ํ•ด๋‹นํ–ˆ์œผ๋ฉฐ ์–ด์ฐจํ”ผ ์ฝ”๋”ฉ ํ…Œ์ŠคํŠธ์—์„œ ์ข‹์€ ์„ฑ์ ์„ ๊ฑฐ๋‘์ง€ ๋ชปํ–ˆ๋”๋ผ๋„ ์ฐจํ›„์— ๋ฌธ์ œ ํ’€์ด ํ•ด์„ค์ด ์˜ฌ๋ผ์˜ค๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ€๋ฒผ์šด ๋งˆ์Œ์œผ๋กœ ์‹œํ—˜์— ์ž„ํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ๋ช‡ ๋‹ฌ์ด ์ง€๋‚˜๋„ ํ•ด๋‹น ์ฝ”๋”ฉํ…Œ์ŠคํŠธ์— ๋Œ€ํ•œ ๋ฌธ์ œ ํ’€์ด ํ•ด์„ค์€ ๋ณด์ด์ง€ ์•Š์•˜๊ณ , ๊ทธ ํ•ด์„ค์„ ์ตœ๊ทผ์—์„œ์•ผ ๋ฐœ๊ฒฌํ•˜๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. (๊ทธ๊ฒƒ๋„ Google ๊ฒ€์ƒ‰์ด ์นœ์ ˆํ•˜๊ฒŒ ์ด๊ฒƒ์ด ์žˆ๋‹ค๋Š” ๊ฑธ..

2020. 3. 28. 20:31

[Spring Cloud] - 7. Hystrix๋ฅผ ์ด์šฉํ•œ Circuit Breaker (๊ธฐ๋ณธํŽธ)

์ง€๋‚œ ํฌ์ŠคํŠธ์— ์ด์–ด์„œ Spring Cloud์—์„œ Circuit Breaker๋ฅผ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋Š” ์ฒซ ๋ฒˆ์งธ ํŒŒํŠธ๋ฅผ ๋“ค์–ด๊ฐ€๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. Hystrix Hystrix๋Š” Spring Cloud ์Šคํƒ์—์„œ ์ œ๊ณตํ•˜๋Š” Circuit Breaker ์ค‘ ํ•˜๋‚˜์ž…๋‹ˆ๋‹ค. Netflix์—์„œ ๊ฐœ๋ฐœํ–ˆ์œผ๋ฉฐ ํ˜„์žฌ๋Š” Spring Cloud์˜ ํ‘œ์ค€ Circuit Breaker๋กœ ์ž๋ฆฌ ์žก๊ณ  ์žˆ์ฃ . ๊ธฐ๋ณธ์ ์œผ๋กœ Hystrix๋Š” ์œ„์™€ ๊ฐ™์€ ํ˜•ํƒœ๋กœ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค. ๋ธŒ๋ผ์šฐ์ € ํ˜น์€ ๋ชจ๋ฐ”์ผ์—์„œ ์–ด๋–ค API ์š”์ฒญ์ด ๋“ค์–ด์™”์„ ๊ฒฝ์šฐ, ํ•ด๋‹น ์„œ๋น„์Šค์˜ ์—”๋“œํฌ์ธํŠธ๊ฐ€ ํ˜ธ์ถœ๋˜๋Š”๋ฐ, ์ด ๋•Œ ์„œ๋น„์Šค์— ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ๊ฑฐ๋‚˜ ์‘๋‹ต์ด ์—†์„ ๊ฒฝ์šฐ, ์ดํ›„ ์ด์šฉ์ž์—๊ฒŒ ์žฅ์• ๊ฐ€ ์ „ํŒŒ๋˜์ง€ ์•Š๊ณ , ๋ฏธ๋ฆฌ ์ •์˜๋œ ์˜ค๋ฅ˜๋ฅผ ๋ธŒ๋ผ์šฐ์ € ํ˜น์€ ๋ชจ๋ฐ”์ผ์—์„œ ์ „์†กํ•˜๊ฒŒ ๋˜์–ด ์˜ค๋ฅ˜ ์ „ํŒŒ๋ฅผ ๋ง‰์•„์ฃผ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋ฉด..

2020. 2. 8. 22:31

[Spring Cloud] - 6. Eureka๋ฅผ ์ด์šฉํ•œ ์„œ๋น„์Šค ๊ฒ€์ƒ‰

MSA๋กœ ์„ค๊ณ„๋œ ์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ๊ทธ ์ธ์Šคํ„ด์Šค๊ฐ€ ์„œ๋น„์Šค๋ณ„๋กœ ๋‚˜๋ˆ„์–ด์ ธ ์žˆ๊ณ , ๋งŒ์•ฝ ์ด๋ฅผ ๋กœ๋“œ ๋ฐธ๋Ÿฐ์‹ฑ์„ ์ด์šฉํ•ด ์—ฌ๋Ÿฌ ์„œ๋น„์Šค๋ฅผ ๋ถ„์‚ฐ ์ฒ˜๋ฆฌํ•˜๊ฒŒ ๋œ๋‹ค๋ฉด, ์„œ๋กœ ๋‹ค๋ฅธ ์ธ์Šคํ„ด์Šค๊ฐ€ ์—ฌ๋Ÿฌ ๊ฐœ ์ƒ๊ธฐ๊ฒŒ ๋˜๋ฉฐ, ๊ทธ๋ ‡๊ฒŒ ๋˜๋ฉด API ์š”์ฒญ๋งˆ๋‹ค ์ ์ ˆํ•œ ์ธ์Šคํ„ด์Šค์˜ Endpoint๋ฅผ ๋งค๊ฒจ์ค˜์•ผ ํ•ฉ๋‹ˆ๋‹ค. Service Discovery๋Š” ์ด๋Ÿฌํ•œ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ณ ์ž, Server-Client ๋ฐฉ์‹๊ณผ ์œ ์‚ฌํ•œ Self-Registration Pattern์„ ์ด์šฉํ•ด ์ž์‹ ์˜ ์„œ๋น„์Šค๋ฅผ ์ค‘์•™์˜ Registry์— ๋“ฑ๋กํ•˜๊ณ , ์ด๋ฅผ ์š”์ฒญํ•  ๋•Œ๋งˆ๋‹ค ์•Œ๋งž๋Š” Endpoint๋ฅผ ๋งค์นญํ•ด์ค€๋‹ค๋Š” ๊ฒƒ์„ ์•Œ์•˜์Šต๋‹ˆ๋‹ค. Eureka Spring Cloud ์Šคํƒ์—์„œ ์ด๋Ÿฌํ•œ ์—ญํ• ์„ ํ•˜๋Š” ๋Œ€ํ‘œ์ ์ธ ๋ชจ๋“ˆ๋กœ Eureka๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. Eureka๋Š” Netflix OSS ์ค‘ ํ•˜๋‚˜๋กœ Spr..

2020. 1. 22. 17:53

[Spring Cloud] - 5. Zuul Gateway๋ฅผ ์ด์šฉํ•œ Filtering

์ด๋ฒˆ ํฌ์ŠคํŠธ์—์„œ๋Š” Routing์— ์ด์–ด์„œ Zuul Gateway๋ฅผ ์ด์šฉํ•œ Filtering์— ๋Œ€ํ•ด์„œ ์ด์•ผ๊ธฐํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. Filtering Spring Boot์—์„œ ํ•„ํ„ฐ๋ง์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ๋Š” PreFilter์™€ ๊ฐ™์€ ์—”๋“œํฌ์ธํŠธ์˜ ๋ณด์•ˆ ๋“ฑ์—์„œ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ์ด ํ•„ํ„ฐ๋ง์„ ์ด์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” Spring Security์—์„œ ์ œ๊ณตํ•˜๋Š” JWT ๋“ฑ์˜ ๋ณด์•ˆ ์ˆ˜๋‹จ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ธ์ฆ์„ ๋ฐ›๊ณ , ์—”๋“œํฌ์ธํŠธ์— ์ ‘๊ทผํ•˜๋Š” ๋ฐฉ์‹์ด์ฃ . Zuul Gateway์—์„œ๋„ ์—”๋“œํฌ์ธํŠธ์˜ ๋ณด์•ˆ์„ ์ ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ํ•„ํ„ฐ๋ง ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์œ„ ์•„ํ‚คํ…์ฒ˜๋Š” Zuul Gateway์˜ ์ฝ”์–ด๋ฅผ ๊ทธ๋ฆฐ ์•„ํ‚คํ…์ฒ˜์ž…๋‹ˆ๋‹ค. Zuul Servlet์„ ํ†ตํ•ด ๋“ค์–ด์˜ค๋Š” ์š”์ฒญ์„ Routing ํ•˜๊ฒŒ ๋˜๋Š”๋ฐ์š”. ๊ทธ๋ฆฌ๊ณ , ๊ทธ ๋ฐ‘๋‹จ์—๋Š” ZuulFilter Runner๊ฐ€ ์žˆ์–ด์„œ ์—”๋“œ..

2020. 1. 17. 18:55

[Spring Cloud] - 4. Zuul Gateway๋ฅผ ์ด์šฉํ•œ Routing

์ง€๋‚œ MSA ํฌ์ŠคํŠธ์— ์ด์–ด, ์ด๋ฒˆ ํฌ์ŠคํŠธ์—์„œ๋Š” Spring Cloud์—์„œ API Gateway๋ฅผ ๊ตฌํ˜„ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. https://blog.neonkid.xyz/205 [MSA] - 2. API Gateway๊ฐ€ ํ•„์š”ํ•œ ์ด์œ  ์•ˆ๋…•ํ•˜์„ธ์š”. ์ด๋ฒˆ ๊ธ€์€ MSA์— ๋Œ€ํ•œ ๊ธ€์„ ์ด์–ด์„œ API Gateway์— ๋Œ€ํ•œ ์ด์•ผ๊ธฐ๋ฅผ ํ•˜๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. ์ง€๋‚œ MSA ๊ธ€์—์„œ๋Š” MSA๋ฅผ ์™œ ์จ์•ผํ•˜๋Š”์ง€, ์–ด๋–จ ๋•Œ ํ•„์š”ํ•˜๊ณ , ๋ฌด์Šจ ์žฅ๋‹จ์ ์ด ์žˆ๋Š”์ง€๋ฅผ ๊ฐ„๋žตํ•˜๊ฒŒ ์„ค๋ช…ํ•ด๋ณด๋Š” ์•„์ฃผ ์‰ฌ์šด.. blog.neonkid.xyz ํ˜น์‹œ ์ง€๋‚œ ๊ธ€์„ ์ฝ์–ด๋ณด์‹œ์ง€ ๋ชปํ–ˆ๋‹ค๋ฉด, ์œ„ ๋งํฌ๋ฅผ ํ†ตํ•ด์„œ API Gateway๊ฐ€ MSA์—์„œ ์™œ ํ•„์š”ํ•œ์ง€, ์•Œ์•„๋ณด์‹œ๊ณ  ๊ฐ€์‹ ๋‹ค๋ฉด, ์ด ํฌ์ŠคํŠธ๋ฅผ ์ดํ•ดํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋  ๊ฒƒ์ด๋ผ๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. Gateway for Spring Cloud Spr..

[Java] - Java Stream API

Java ์–ธ์–ด๊ฐ€ ๋ฒŒ์จ 11 ๋ฒ„์ „์ด ๋‚˜์˜ค๊ณ  ์žˆ๋„ค์š”. Java๋Š” ์—ญ์‚ฌ๊ฐ€ ๊นŠ๊ณ , ์˜ค๋ž˜๋œ ์–ธ์–ด์ด์ž ๋น„๋‚œ๋„ ๋งŽ์ด ๋ฐ›์€ ์–ธ์–ด์ž…๋‹ˆ๋‹ค. ๊ทธ๋ ‡์ง€๋งŒ ์•„์ง๋„ ๋งŽ์€ ๊ณณ์—์„œ ์‚ฌ์šฉ๋˜๊ณ  ์žˆ๊ณ , ๋Œ€์ฒดํ•˜๋Š” ๊ณณ๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ค๋Š˜์€ Java 8์—์„œ ๋“ฑ์žฅํ•œ Stream์— ๋Œ€ํ•ด ์ด์•ผ๊ธฐํ•ด๋ณด๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. Stream API Stream ? ํ˜น์‹œ ๊ทธ๊ฑฐ, Buffer ๋ณด๋‹ค ์†๋„๊ฐ€ ๊ฒ๋‚˜ ๋น ๋ฅธ ๊ทธ Stream ? ๋„ค, ๊ทธ๊ฑด ์•„๋‹™๋‹ˆ๋‹ค. Java์—์„œ Stream์€ ํ•จ์ˆ˜ํ˜• ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•œ ๊ธฐ์ˆ  ์ค‘ ํ•˜๋‚˜๋กœ, Java 8์—์„œ ์ƒˆ๋กœ์ด ๋“ฑ์žฅํ•˜์˜€์Šต๋‹ˆ๋‹ค. Java 8 ์ด์ „์—๋Š” ๋ฐฐ์—ด์ด๋‚˜ Collections์˜ ์ž๋ฃŒ ๊ตฌ์กฐ ์ธ์Šคํ„ด์Šค๋ฅผ ๋‹ค๋ฃจ๊ธฐ ์œ„ํ•ด for ๋ฌธ์ด๋‚˜ foreach ๋ฌธ์„ ์‚ฌ์šฉํ•˜์—ฌ ์š”์†Œ๋ฅผ ํ•˜๋‚˜์”ฉ ๊บผ๋‚ด์—ˆ์ง€์š”. ๊ฐ„๋‹จํ•œ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์งœ๋Š” ๊ฒƒ์ด๋ผ๋ฉด, ํฐ ์ƒ๊ด€์ด ์—†..

2019. 12. 29. 13:47

[Spring Cloud] - 3. API ์„œ๋ฒ„๋กœ ์„ค์ • ๊ฐ’ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ

์ง€๋‚œ ํฌ์ŠคํŠธ์—์„œ๋Š” Configuration Server๋ฅผ ์„ค์ •ํ•˜๋Š” ๋‘ ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ดค์Šต๋‹ˆ๋‹ค. ์ฒซ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•์€ ๋กœ์ปฌ์˜ ์ €์žฅ๋˜์–ด ์žˆ๋Š” ์„ค์ • ํŒŒ์ผ์„ ๊ฐ€์ ธ์˜ค๋Š” ๋ฐฉ๋ฒ•์ด์—ˆ๊ณ , ๋‘ ๋ฒˆ์จฐ ๋ฐฉ๋ฒ•์€ Github ๋“ฑ์˜ ๋ ˆํฌ์ง€ํ„ฐ๋ฆฌ์— ์žˆ๋Š” ํŒŒ์ผ์„ ๊ฐ€์ ธ์˜ค๋Š” ๋ฐฉ๋ฒ•์ด์—ˆ์Šต๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๋Š” ์ด๋Ÿฌํ•œ ์„œ๋ฒ„๊ฐ€ ์ œ๋Œ€๋กœ ๊ตฌ์ถ•๋˜์–ด ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๊ธฐ ์œ„ํ•ด์„œ REST API๋ฅผ ์ง์ ‘ ํ˜ธ์ถœํ•˜์—ฌ ํ•ด๋‹น ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•˜๋Š” ๋ฐฉ๋ฒ•์œผ๋กœ ํ…Œ์ŠคํŠธ๋ฅผ ํ–ˆ์—ˆ๋Š”๋ฐ์š”. ํ•˜์ง€๋งŒ ์ด๋Ÿฌํ•œ ๊ฒฐ๊ณผ๋ฅผ ๋ณด๊ณ , ์–ด๋–ป๊ฒŒ API ์„œ๋ฒ„๊ฐ€ ์ด๋Ÿฌํ•œ ๊ฐ’์„ ๋ฐ›๋Š”์ง€์— ๋Œ€ํ•ด์„œ๋Š” ์•„๋งˆ ๊ถ๊ธˆํ•ด ํ•˜์…จ์„ ๊ฒƒ์ด๋ผ ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ ์ด๋ฒˆ ํฌ์ŠคํŠธ์—์„œ๋Š” ์ง์ ‘ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์„ ๋งŒ๋“ค๊ณ , ํ•ด๋‹น ์„œ๋ฒ„์— ๋งž๋Š” ์„ค์ •๊ฐ’์„ ๋งŒ๋“ค์–ด, ๊ฐ€์ ธ์˜ค๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๋จผ์ € API ์„œ๋ฒ„๋ฅผ ๋งŒ๋“ค์–ด๋ณด๋„๋ก ํ•˜์ฃ . ์ƒˆ๋กœ์šด Spring Boot..

2019. 12. 26. 13:26

[Spring Cloud] - 2. Github and Configuration Server

์•ˆ๋…•ํ•˜์„ธ์š”. ์ง€๋‚œ ์‹œ๊ฐ„์—๋Š” Spring Cloud์˜ Configuration Server๋ฅผ ๋กœ์ปฌ ํ™˜๊ฒฝ์˜ ์„ค์ • ํŒŒ์ผ์„ ํ†ตํ•˜์„œ ๊ตฌ์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์•Œ์•„๋ดค์Šต๋‹ˆ๋‹ค. ๋กœ์ปฌ ๋‚ด์— ์žˆ๋Š” ์„ค์ • ํŒŒ์ผ์„ ์ง์ ‘ ์ž‘์„ฑํ•˜์—ฌ ์ด๋ฅผ Pull ๋ฐฉ์‹์œผ๋กœ ์ด์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ๋ณ„๋„์˜ ๊ตฌ์„ฑ ์„œ๋ฒ„๋ฅผ ์ž‘์„ฑํ•˜๋Š” ๊ฒƒ์€ ๋งค์šฐ ํšจ์œจ์ ์œผ๋กœ ์„œ๋ฒ„์˜ ๊ตฌ์„ฑ ์„ค์ •์„ ๋ณ€๊ฒฝํ•˜๊ณ  ์ƒˆ๋กœ์ด ์ž‘์„ฑํ•˜๋Š” ๋ฐ ์šฉ์ดํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ, ์—ฌ๊ธฐ์— Git์„ ์ถ”๊ฐ€ํ•œ๋‹ค๋ฉด ์–ด๋–จ๊นŒ์š”? ๊ธฐ์กด์˜ ์„ค์ •์—์„œ ์ƒˆ๋กœ์šด ์„ค์ •์œผ๋กœ ๋ณ€๊ฒฝํ•œ ๋’ค, ์–ด๋– ํ•œ ๋ฌธ์ œ์ ์ด ์ƒ๊ฒผ๋‹ค๊ฑฐ๋‚˜ ์ด์Šˆ๊ฐ€ ๋ฐœ์ƒ๋œ๋‹ค๋ฉด ๋กค๋ฐฑ์„ ํ•˜์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ํŒŒ์ผ ์‹œ์Šคํ…œ์—์„œ ๋กค๋ฐฑ์„ ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์€ Volume Shadow Copy ์ •๋„๋‚˜ ํ˜น์€ RAID ๋ ˆ๋ฒจ์—์„œ ์ œ๊ณตํ•˜๋Š” Snapshot, BRTFS์—์„œ ์ œ๊ณตํ•˜๋Š” Snapshot์ผ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ..

2019. 12. 22. 12:39

[Spring Cloud] - 1. Configuration Server ๊ตฌ์„ฑ

์ง€๋‚œ ๊ธ€์—์„œ MSA(Micro Service Architecture)์— ๋Œ€ํ•œ ๊ธฐ๋ณธ์ ์ธ ๋‚ด์šฉ์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ดค์—ˆ๋Š”๋ฐ์š”. ํ˜น์‹œ๋ผ๋„ ์ด ๊ธ€์„ ์ฝ์–ด๋ณด์ง€ ๋ชปํ–ˆ๋‹ค๋ฉด, ์•„๋ž˜์˜ ๋งํฌ๋ฅผ ํ†ตํ•ด์„œ ์ง์ ‘ ์ฝ์–ด๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. MSA (Micro Service Architecture) ๋ž€ ๋ฌด์—‡์ผ๊นŒ? ์•ˆ๋…•ํ•˜์„ธ์š”. ์˜ค๋Š˜์€ Micro Service Architecture์— ๋Œ€ํ•ด ์ด์•ผ๊ธฐ ํ•ด๋ณด๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. ํ•œ๋™์•ˆ MSA๊ฐ€ ๊ต‰์žฅํžˆ ํ™”๋‘์˜€๋Š”๋ฐ, ์š”์ฆ˜์€ ๋ถ„์œ„๊ธฐ๊ฐ€ ์‹์–ด์ง€๋Š” ๋“ฏํ•˜์—ฌ ์˜ค๋Š˜ ๋ธ”๋กœ๊ทธ์— ์ด ๊ธ€์„ ์ ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๋Š” ๋ฐฑ์—”๋“œ ๊ฐœ๋ฐœ.. blog.neonkid.xyz ์ด๋ฒˆ ํŒŒํŠธ์—์„œ๋Š” Java ์–ธ์–ด์˜ ์›น ๊ฐœ๋ฐœ ํ”„๋ ˆ์ž„์›Œํฌ์ธ Spring์„ ์ด์šฉํ•ด์„œ ์ด Micro Service Architecture๋ฅผ ๊ตฌ์„ฑํ•˜๋Š” ์‹œ๊ฐ„์„ ๊ฐ€์ ธ๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ๊ทธ..

[GP] Spring boot์—์„œ REST API ๊ฐœ๋ฐœ ์‹œ์ž‘ํ•ด๋ณด๊ธฐ

์ด ๊ธ€์€ N.K Dev Lab์—์„œ ์ž‘์„ฑ๋œ ๊ธ€์ž…๋‹ˆ๋‹ค. ์•ˆ๋…•ํ•˜์„ธ์š”. N.K Dev Lab์— ๊ธ€์„ ์•ˆ์“ด์ง€๊ฐ€ ์ •๋ง ์˜ค๋ž˜๋˜์—ˆ๋„ค์š”. ์˜ฌํ•ด๋Š” ์ €์˜ ์ทจ์—… ์‹œ์ฆŒ์ธ ๋งŒํผ ๋ธ”๋กœ๊ทธ์— ๊ธ€์„ ์“ฐ๋Š” ๊ฒƒ์— ๋งŽ์ด ์†Œํ™€ํ–ˆ์—ˆ์Šต๋‹ˆ๋‹ค. ๋”์šฑ์ด Dev Lab ๋ฆฌ๋‰ด์–ผ๊ณผ ๊ด€๋ จํ•˜์—ฌ ์—ฌ๋Ÿฌ ์ผ๋“ค์ด ์žˆ์—ˆ๋Š”๋ฐ, ์ €์˜ Dev Lab์ด ๋‹ค์‹œ Jekyll๋กœ ๋Œ์•„์˜ค๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด์œ ๋Š” ์—ฌ๋Ÿฌ๊ฐ€์ง€๊ฐ€ ์žˆ์ง€๋งŒ ์ด์ œ ์ œ๊ฐ€ ์ทจ์—…์„ ํ•˜๊ฒŒ ๋˜๋ฉด ํ˜„์žฌ ํ•˜๊ณ  ์žˆ๋Š” ์ผ๋“ค์„ ์กฐ๊ธˆ ๋ฏธ๋ฆฌ ๊ฐ„์†Œํ™” ํ•˜๋Š” ์ž‘์—…์ด๋ผ๊ณ  ๋ณด์‹œ๋ฉด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ํ•œ ๊ฐ€์ง€ ์˜ˆ๋ฅผ ๋“ค์–ด, ์ด์ œ Dev Lab์— ์˜ฌ๋ฆฌ๋Š” ๊ธ€์€ ์ €์˜ ์†์— ์˜ํ•ด ์ˆ˜๋™์œผ๋กœ NKLAB(Tistory)์— ๊ฒŒ์‹œ๋˜์ง€ ์•Š๊ณ  ์ž๋™ํ™” ๋œ ์ฝ”๋“œ์— ์˜ํ•ด์„œ ์˜ฌ๋ผ๊ฐ€๊ฒŒ ๋˜๋Š” ์ž‘์—… ๋“ฑ Hugo ๋ณด๋‹ค๋Š” Jekyll์ด ์ข€ ๋” ํŽธํ•˜๋”๊ตฐ์š”. ๋ณธ๋ก ์œผ๋กœ ๋„˜์–ด๊ฐ€์„œ, ์˜ค๋Š˜์€ Sp..