๐Ÿ‘จ‍๐Ÿ’ป kimtongting
article thumbnail
์ธํ…”๋ฆฌ์ œ์ด SpringBoot ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ / intellij ์Šคํ”„๋ง๋ถ€ํŠธ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ Maven

๐Ÿ“”์ธํ…”๋ฆฌ์ œ์ด ์Šคํ”„๋ง๋ถ€ํŠธ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑํ•˜๊ธฐ ๐Ÿ“„New Project ! ๋ญ ์‚ฌ์‹ค SpringBoot๋ผ๊ณ  ํ•ด์„œ ๋ณ„ ๊ฑด ์—†๋‹ค. ์•„๋‹ˆ์ง€, ์˜คํžˆ๋ ค ์‰ฝ๋‹ค! 'New Project' > 'Spring Initializr' ๋ฅผ ์„ ํƒ ํ›„, Default๊ฐ€ ์„ค์ •๋˜์–ด ์žˆ๋Š” ์ƒํƒœ์—์„œ ๊ทธ๋ƒฅ ๋ƒ…๋‹ค Next ๋ฅผ ๋ˆ„๋ฅธ๋‹ค. ์–ด์ฐจํ”ผ ์šฐ๋ฆฌ์—๊ฒŒ ์ค‘์š”ํ•œ ๊ฑด ์ดํ›„์— ์žˆ๋‹ค. ๐Ÿ“„Project Settings ํ”„๋กœ์ ํŠธ์˜ ์‹œ์ž‘์ ์— ์˜จ ์—ฌ๋Ÿฌ๋ถ„๊ป˜์„œ๋Š” ์ผ์ƒ์ผ๋Œ€์˜ ํ”„๋กœ์ ํŠธ ๋ช…์„ ์ž…๋ ฅํ•ด์ฃผ์‹œ๋ฉด ๋˜๋Š”๋ฐ, Group / Artifact ๋Š” ์„ค๋ช…ํ•  ๊ฒƒ๋„ ์—†๊ณ  ํ”„๋กœ์ ํŠธ์˜ ๋ฐฉํ–ฅ์„ฑ๊ณผ ๋ฐฐํฌ ๋ฐฉํ–ฅ์— ๋”ฐ๋ผ ์ž…๋ง›์— ๋งž๋Š” Type, Language, Packaging, Java Version ์„ ์„ ํƒ ํ›„ 'Next' ๋ฅผ ๋ˆ„๋ฅธ๋‹ค. ํ•„์ž๋Š” ์ž๋™์œผ๋กœ ์„ค์ •๋œ ๊ธฐ๋ณธ ์„ค์ •์—์„œ ์•„๋ฌด๊ฒƒ๋„ ์† ๋Œ€..

article thumbnail
[๋„๋ฉ”์ธ] ๋‚˜๋งŒ์˜ ๋„๋ฉ”์ธ ์„ค์ • ํ‹ฐ์Šคํ† ๋ฆฌ 2์ฐจ ๋„๋ฉ”์ธ

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

article thumbnail
[Spring Boot]Scheduled duplicate ์Šค์ผ€์ค„๋Ÿฌ ์ค‘๋ณต์‹คํ–‰

๐Ÿ“”Scheduled ๋„ˆ๋ž€ ๋…€์„ Scheduled ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ–ˆ์—ˆ๋‹ค๋ฉด, ํ•œ ๋ฒˆ์ฏค์€ ๊ฒช์–ด๊ฐ€๋Š” ์ฝ”์Šค๋ผ๊ณ  ์ƒ๊ฐํ•œ๋‹ค. ํŠนํžˆ๋‚˜ ์ด๋ฒˆ์— Logback ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ ํ•˜๋ฉฐ, Spring ์Šค์ผ€์ค„๋Ÿฌ์—์„œ ๋กœ๊ทธ๊ฐ€ ๋‘ ๋ฒˆ์”ฉ ์ฐํžˆ๋Š” ๊ฒƒ์„ ๋ณด๊ณ  ์•„์ฐจ ์‹ถ์—ˆ๋‹ค. ๐Ÿ“„์›์ธ? ๐Ÿ“์Šค์ผ€์ค„๋Ÿฌ๊ฐ€ ์ค‘๋ณต์œผ๋กœ ์‹คํ–‰๋˜๋Š” ์›์ธ์€ ๋‹ค์–‘ํ•˜๊ฒŒ ์žˆ์ง€๋งŒ, Spring์—์„œ๋Š” ๋Œ€ํ‘œ์ ์œผ๋กœ Bean ์ƒ์„ฑ์ด ๋  ๋•Œ ๋ฐœ์ƒํ•œ๋‹ค. Bean์€ ์ˆœ์ฐจ์ ์œผ๋กœ @Configuration ์–ด๋…ธํ…Œ์ด์…˜์ด ์„ค์ •๋œ config Class ๋ฅผ ์ฝ์œผ๋ฉฐ ์ด์™€ ๊ด€๋ จ๋œ ์„ค์ • ํŒŒ์ผ(properties)๋“ค์„ ํ•จ๊ป˜ ๋ถˆ๋Ÿฌ์˜ค๋ฉฐ Bean์„ ๋“ฑ๋กํ•˜๊ฒŒ ๋˜๋Š”๋ฐ(Create๊ฐ€ ์•„๋‹ˆ๋ผ Register์˜ ๊ฐœ๋…์ด๋‹ค.) Context์—์„œ ์Šค์ผ€์ค„๋Ÿฌ Bean ์„ ๋“ฑ๋กํ•˜๊ฒŒ๋˜๊ณ , @Component ๋“ฑ์˜ ์–ด๋…ธํ…Œ์ด์…˜์œผ๋กœ ์ธํ•ด scan์„ ์ง„..

article thumbnail
[Spring] Spring Boot Logback / ์Šคํ”„๋ง ๋กœ๊ทธ ์„ค์ •

๐Ÿ“”Springboot ์— Logback ์ ์šฉํ•˜๊ธฐ ๐Ÿ“„์‹œ์ž‘ ๊ณ„๊ธฐ? ์šฐ๋ฆฌ ํŒ€ ์—…๋ฌด์˜ ํŽธ์˜์„ฑ์„ ์œ„ํ•œ ํ”„๋กœ์„ธ์Šค๋ฅผ ๊ณ ๋ฏผํ•˜๋‹ค๊ฐ€ ์ ์‹ฌ ์‹œ๊ฐ„์— ๊ฐ€๋ณ๊ฒŒ ๋งŒ๋“  ํ”„๋กœ์ ํŠธ(๋“ฑ๋ก ์ž๋ฃŒ ์ž๋™ ๊ฒ€์ˆ˜, ์šด์˜ ํ”„๋กœ์„ธ์Šค ์ด์ƒ ์œ ๋ฌด ์ฒดํฌ, RM ๋ฐœ์†ก ๋“ฑ์˜ ๊ธฐ๋Šฅ์„ ํƒ‘์žฌํ•œ ์ž๋™ ๋ฐฐ์น˜ ์‹œ์Šคํ…œ)๋ฅผ ํŒ€์—์„œ ๊ฒฉํ•˜๊ฒŒ ํ™˜์˜ํ•ด์ฃผ์–ด ๊ฐœ๋ฐœ๊ณ„์—์„œ ์Šคํ…Œ์ด์ง•์œผ๋กœ ์˜ฎ๊ธฐ๊ธฐ๋กœ ํ–ˆ๋‹ค ใ…Žใ…Ž ๋ฐฐ์น˜ ํ”„๋กœ์„ธ์Šค์ด๋‹ค ๋ณด๋‹ˆ Scheduled ๊ธฐ๋Šฅ์„ ๊ฐ€์ง„ ํ”„๋กœ์ ํŠธ๋‹ค. Linux OS ์—์„œ jar๋กœ ๊ฐ€๋ณ๊ฒŒ ๊ตฌ๋™ํ•  ๊ณ„ํš์ด์—ˆ๊ณ , ๊ธฐ์กด์—๋Š” Tomcat์— war๋กœ ๋นŒ๋“œํ•ด์„œ lombok์˜ ๋กœ๊ทธ๋ฅผ ์ฐ์—ˆ์—ˆ๋‹ค. ์ด์ œ๋Š” ๋ณ„๋„ Log ํŒŒ์ผ๋กœ ๊ด€๋ฆฌํ•  ์˜ˆ์ • ์ด๊ธฐ์— ๋กœ๊ทธ ๊ฒฝ๋กœ๋Š” ๋”ฐ๋กœ ์žก์•„์ฃผ์–ด์•ผ ํ–ˆ๋‹ค. ๐Ÿ“logback-spring.xml ๊ฐ์‚ฌํ•˜๊ฒŒ๋„ SpringBoot ์—์„œ๋Š” ํŒŒ์ผ ๋ช…์นญ๋งŒ์œผ๋กœ ์ž๋™์œผ๋กœ ์ธ์‹ํ•ด์ฃผ๋Š” ..

article thumbnail
[ํ‹ฐ์Šคํ† ๋ฆฌ]ํ‹ฐ์Šคํ† ๋ฆฌ ์„œ์‹ ๊ณต์œ  / ๊น”๋”ํ•œ ์„œ์‹๊ณต์œ 

๐Ÿ“”์ œ๋ชฉ ๐Ÿ“„ํƒ€์ดํ‹€1 ๐Ÿ“๋ณธ๋ฌธ1 ๐Ÿ‘จ‍๐Ÿ’ป๐Ÿ’ปโŒจ ๐Ÿ‘จ‍๐Ÿ’ป๐Ÿ’ปโŒจ some code... ๐Ÿ“„ํƒ€์ดํ‹€2 ๐Ÿ“๋ณธ๋ฌธ2 ๐Ÿ‘จ‍๐Ÿ’ป๐Ÿ’ปโŒจ ๐Ÿ‘จ‍๐Ÿ’ป๐Ÿ’ปโŒจ some code... ๐Ÿ“š๋” ์ฝ์„๊ฑฐ๋ฆฌ ๐Ÿ”— ๋งํฌ ์ด๋ชจ์ง€ ๋งํฌ http://emojihomepage.com/ Emoji Homepage ๐Ÿ‘€ - Copy and paste emoji. ๐Ÿ’จ Fast and ๐Ÿ‘Œ Simple. ๐Ÿค” Find โ˜ Your ๐Ÿ˜€ Emoji ๐Ÿ’จ Fast & ๐Ÿ‘Œ Simple! ๐Ÿ‘† Click to copy and paste emojis โ˜บ Emoji Homepage is the easiest way to find and get emojis emojihomepage.com ๋ณธ๋ฌธ ๊ตฌ์กฐ ๊ธฐ๋ณธ ๋Œ€ํ‘œ ์ด๋ฏธ์ง€ ์‚ฌ์ด์ฆˆ: ์ œ๋ชฉ1 ์‚ฌ์ด์ฆˆ: ์ œ๋ชฉ2 ์‚ฌ์ด์ฆˆ: ๋ณธ๋ฌธ2 ์ฝ”๋”ฉ์„œ์‹

article thumbnail
[NestJS] NestJS ์„ค์น˜ํ•˜๊ธฐ(๋‹จ์ˆœ ์„ค์น˜ ๋ฐ ์‹คํ–‰)

NestJS ์„ค์น˜ ์‚ฌ์ „์„ค์น˜ Node.js ๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. Node.js ๋งํฌ : nodejs.org/ko/ Node.js Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. nodejs.org ๋ณธ์ธ์—๊ฒŒ ๋งž๋Š” ๋ฒ„์ „์„ ์„ค์น˜ํ•˜์„ธ์š” : ) ์„ค์น˜๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด, ํ„ฐ๋ฏธ๋„ ์ฐฝ์„ ์—ด๊ณ , ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜์—ฌ ์ œ๋Œ€๋กœ ์„ค์น˜ํ–ˆ๋Š”์ง€ ํ™•์ธํ•ด๋ด…๋‹ˆ๋‹ค. $ node -v NestJS ์„ค์น˜ Node.js๋ฅผ ์„ค์น˜ํ•˜๊ฒŒ ๋˜๋ฉด ๊ธฐ๋ณธ์ ์œผ๋กœ npm์ด ์ž๋™์œผ๋กœ ์„ค์น˜๋˜๋Š”๋ฐ, npm ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•ด ์ „์—ญ(-g)์œผ๋กœ nestjs๋ฅผ ์„ค์น˜(i)ํ•ฉ๋‹ˆ๋‹ค. npm i -g @nestjs/cli ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ์ ๋‹นํ•œ ํด๋”๋ฅผ ๊ณจ๋ผ ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•ด๋ณด๋„๋ก ํ•ฉ๋‹ˆ๋‹ค. ์ €๋Š” ์—ฌ๊ธฐ์„œ 'nestPr..

article thumbnail
[Spring Property / Spring Scheduler] ์Šคํ”„๋ง ํ”„๋กœํผํ‹ฐ ์ ์šฉ / ์Šค์ผ€์ค„๋Ÿฌ / Spring Scheduler

์„œ์‹ ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•  ๋•Œ, ๊ฐ€๋ณ€์˜ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋Š” ์ •๋ณด๋Š” ๋ชจ๋‘ properties์— ๋„ฃ๋Š”๋‹ค. ํ•„์ž์˜ ๊ฒฝ์šฐ ํ”„๋กœ์ ํŠธ ๋ฐฐํฌ ์ˆœ์„œ์ธ 'DEV' -> 'STAGE' -> 'PROD' ์—์„œ 'STAGE' -> 'DEV' ๋กœ ๋‚ด๋ฆฌ๊ฑฐ๋‚˜, 'PROD' ๋‹จ๊ณ„์—์„œ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ์— ์ฃผ๋กœ ์“ฐ๊ณ  ์žˆ๋‹ค. config.flag.type ์— 'D', 'S', 'P' ๋กœ ๊ตฌ๋ถ„ํ•˜์—ฌ config.flag.type์ด 'D' ์ผ ๊ฒฝ์šฐ, DEV ์„œ๋ฒ„๋กœ ๋“ฑ๋กํ•œ config๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๊ณ  ๋ญ ๊ทธ๋Ÿฐ์‹์ด๋‹ค. ์„œ๋ฒ„๋ฅผ ์ค‘๋‹จํ•˜์ง€ ์•Š๊ณ  ์ด ํŒŒ์ผ๋งŒ์„ ์ˆ˜์ •ํ•จ์œผ๋กœ์จ ํ”„๋กœ์ ํŠธ์˜ ์„ค์ • ๊ฐ’๋“ค์„ ํ•ธ๋“ค๋ง ํ•œ๋‹ค๋Š” ์ ์—์„œ ๊ต‰์žฅํžˆ ์œ ์šฉํ•˜๋‹ค. ํ…Œ์ŠคํŠธ ์‹œ๋‚˜๋ฆฌ์˜ค Spring ๊ตฌ์กฐ๋กœ ํ”„๋กœ์ ํŠธ๋ฅผ ๊ตฌ์„ฑํ–ˆ๋‹ค๋ฉด ๊ต‰์žฅํžˆ ์‹ฌํ”Œํ•˜๋‹ค. ์ด๋ฏธ classpath:resources/application.pr..

article thumbnail
[Git] Git branch & Naming

Branch ์ƒ์„ฑ ๋ฐฉ์‹๊ณผ ๋„ค์ด๋ฐ ๊ทœ์น™ ํด๋ก  ์ฝ”๋”ฉ์„ ์‹œ์ž‘ํ•˜๋ ค๋Š”๋ฐ, ํ˜„์—…์—์„œ ํ•˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ธŒ๋žœ์น˜๋ฅผ ๋‚˜๋ˆ ์„œ ํ•˜๋ ค๋‹ˆ ๋ธŒ๋žœ์น˜ ์ด๋ฆ„์—๋„ ๊ทœ์น™์ด ์žˆ์ง€ ์•Š์„๊นŒ ์‹ถ์–ด ์ฐพ์•„๋ณด๊ณ  ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. ๋”๋ถˆ์–ด, ๋ธŒ๋žœ์น˜ ๋„ค์ด๋ฐ์„ ์•Œ๊ธฐ์— ์•ž์„œ ๋ธŒ๋žœ์น˜ ์ข…๋ฅ˜๋Š” ์–ด๋–ค ๊ฒƒ์ด ์žˆ๋Š”์ง€ ๋จผ์ € ์„ค๋ช…ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. Branch ์˜ ์ข…๋ฅ˜ Main branch ์ค‘์•™ ์ €์žฅ์†Œ์—๋Š” ์ˆ˜๋ช…์ด ๋ฌดํ•œํ•œ ๋‘ ๊ฐ€์ง€ ๋ฉ”์ธ ๋ธŒ๋žœ์น˜๊ฐ€ ์žˆ๋‹ค. ๋ฐ”๋กœ, master ๋ธŒ๋žœ์น˜์™€ develop ๋ธŒ๋žœ์น˜์ด๋‹ค. 1. master branch ์ œํ’ˆ์œผ๋กœ ์ถœ์‹œ๋  ์ˆ˜ ์žˆ๋Š” ๋ธŒ๋žœ์น˜ ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ฐฐํฌ ๊ฐ€๋Šฅํ•œ ์ƒํƒœ๋งŒ์„ ๊ด€๋ฆฌํ•œ๋‹ค. ์—ฌ๊ธฐ์„œ๋Š” ๋ฐฐํฌ(release) ์ด๋ ฅ์„ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•œ๋‹ค. ์ฆ‰, ํ•จ๋ถ€๋กœ master ๋ธŒ๋žœ์น˜์— ๋ณ‘ํ•ฉ(merge) ํ•˜๊ฒŒ ๋˜๋ฉด ํƒ•๋น„์‹ค์— ๋Œ๋ ค๊ฐˆ ์ˆ˜ ์žˆ๋‹ค. ํ•ญ์ƒ master ๋ธŒ๋žœ์น˜์—์„œ ์ž‘์—…..