๐Ÿ‘จ‍๐Ÿ’ป kimtongting
article thumbnail

 

 

 

 

 

๐Ÿ“”์ธํ…”๋ฆฌ์ œ์ด ์Šคํ”„๋ง๋ถ€ํŠธ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑํ•˜๊ธฐ

๐Ÿ“„New Project !

 

๋ญ ์‚ฌ์‹ค SpringBoot๋ผ๊ณ  ํ•ด์„œ ๋ณ„ ๊ฑด ์—†๋‹ค. ์•„๋‹ˆ์ง€, ์˜คํžˆ๋ ค ์‰ฝ๋‹ค!

'New Project' > 'Spring Initializr' ๋ฅผ ์„ ํƒ ํ›„, Default๊ฐ€ ์„ค์ •๋˜์–ด ์žˆ๋Š” ์ƒํƒœ์—์„œ ๊ทธ๋ƒฅ ๋ƒ…๋‹ค Next ๋ฅผ ๋ˆ„๋ฅธ๋‹ค.

์–ด์ฐจํ”ผ ์šฐ๋ฆฌ์—๊ฒŒ ์ค‘์š”ํ•œ ๊ฑด ์ดํ›„์— ์žˆ๋‹ค.


๐Ÿ“„Project Settings

ํ”„๋กœ์ ํŠธ์˜ ์‹œ์ž‘์ ์— ์˜จ ์—ฌ๋Ÿฌ๋ถ„๊ป˜์„œ๋Š” ์ผ์ƒ์ผ๋Œ€์˜ ํ”„๋กœ์ ํŠธ ๋ช…์„ ์ž…๋ ฅํ•ด์ฃผ์‹œ๋ฉด ๋˜๋Š”๋ฐ, Group / Artifact ๋Š” ์„ค๋ช…ํ•  ๊ฒƒ๋„ ์—†๊ณ 

ํ”„๋กœ์ ํŠธ์˜ ๋ฐฉํ–ฅ์„ฑ๊ณผ ๋ฐฐํฌ ๋ฐฉํ–ฅ์— ๋”ฐ๋ผ ์ž…๋ง›์— ๋งž๋Š” Type, Language, Packaging, Java Version ์„ ์„ ํƒ ํ›„ 'Next' ๋ฅผ ๋ˆ„๋ฅธ๋‹ค.

 

ํ•„์ž๋Š” ์ž๋™์œผ๋กœ ์„ค์ •๋œ ๊ธฐ๋ณธ ์„ค์ •์—์„œ ์•„๋ฌด๊ฒƒ๋„ ์† ๋Œ€์ง€ ์•Š๊ณ  ์ƒ์„ฑํ•  ์˜ˆ์ •์ด๋‹ค.


๐Ÿ“„Dependencies

๊ทธ์ € ๊ฐ“ IntelliJ.. (์ž‘์—…์€ ์žฅ๋น„๋นจ์ด์ง€)

๋ฌด๋ ค ์ตœ์ดˆ ์„ค์ •์˜ Dependencies๋ฅผ ๋ฏธ๋ฆฌ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋„์™€์ค€๋‹ค. ์šฐ๋ฆฌ๋Š” ์ผ๋‹จ Spring Boot์—์„œ ํ•„์ˆ˜์ ์œผ๋กœ ๊ถŒ์žฅ๋˜๋Š” 'Spring Web' ๊ณผ 'Spring Web Services' ๋งŒ ์ถ”๊ฐ€ํ•˜๋„๋ก ํ•œ๋‹ค. ๋‚˜๋จธ์ง€๋Š” ํ”„๋กœ์ ํŠธ์—์„œ ์‚ฌ์šฉํ•  lib์˜ ์šฐ์„ ์ˆœ์œ„๋ฅผ ์ •ํ•˜๊ณ  ํ˜ธํ™˜๋˜๋Š” ์ตœ์ ์˜ ๋ฒ„์ „์„ ๋น„๊ตํ•ด๋ณด๋ฉฐ ๋งž๊ฒŒ mvnrepository  ๋ฅผ ํ†ตํ•ด ์ถ”๊ฐ€ํ•  ์˜ˆ์ •์ด๋‹ค.


๐Ÿ“„๋งˆ๋ฌด๋ฆฌ

์ฒ˜์Œ์— Project Settings ์—์„œ ์„ค์ •ํ–ˆ๋˜ Artifact ๋ช…์ด ์ฃผ์–ด์ง€๋ฉฐ, Project Location ์ด ์ž๋™ ์ง€์ •๋œ๋‹ค.(ํ”„๋กœ์ ํŠธ ์†Œ์Šค์˜ ๊ฒฝ๋กœ)

๊ฒฝ๋กœ๊ฐ€ ๋งˆ์Œ์— ๋“ ๋‹ค๋ฉด 'Finish'


๐Ÿ“„ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ์™„๋ฃŒ

๋ญ์•ผ ์ •๋ง ๋์ด๋ผ๊ณ (?) ๊ทธ๋ ‡๋‹ค. ํ”„๋กœ์ ํŠธ ์ตœ์ดˆ ์„ค์ •์„ ์œ„ํ•ด ์ง€์ง€๊ณ  ๋ณถ๊ณ  ์—ด์‹ฌํžˆ ๊ตฌ๊ธ€๋ง ํ–ˆ๋˜ ์‹œ์ ˆ์€ ๊ฐ”๋‹ค. ์•Œ์•„์„œ ์„ค์ •ํ•ด์ฃผ๋‹ˆ ๋‚˜๋Š” ์ฝ”๋”ฉ๋งŒ ์—ด์‹ฌํžˆ ํ•˜๋ฉด ๋œ๋‹ค. -๋-

 

 


[์ถ”๊ฐ€]

pom.xml์—์„œ spring-boot version์— Project 'org.springframework.boot:spring-boot-starter-parent:2.x.x' not found ๊ฐ€ ๋‚˜์˜ค๋Š” ๋ถ„๋“ค์ด ์žˆ์„ ๊ฒƒ์ด๋‹ค.

 

File > Settings(Ctrl + Shift + S) > Build, Excution, Deployment > Build Tools > Maven ์— ๋“ค์–ด๊ฐ€์„œ,

Use plugin registry ์™€ Always update snapshots ์˜ ๋ผ๋””์˜ค ๋ฐ•์Šค๋ฅผ ์ฒดํฌ ํ•ด๋ณด์‹œ์ฃ !  ํ›„ํ›„

 

[์ถ”๊ฐ€2]

์‹คํ–‰์ด ์•ˆ๋œ๋‹ค๊ณ !? Maven ์—์„œ clean ๋„ ํ•˜๊ณ  install ๋„ ํ•˜๊ณ  package ๊นŒ์ง€ ๋‹ค ํ•ด๋ดค๋Š”๋ฐ ์‹คํ–‰์ด ์•ˆ๋œ๋‹ค๊ณ !?

๊ทธ๋Ÿฐ ๋ถ„๋“ค์€ ๋ณด์‹œ๋ผ!

์•„๋ž˜ ์ด๋ฏธ์ง€๋Œ€๋กœ ์„ค์ •!

 

์šฐ์ธก ์ƒ๋‹จ Add Configuration ๋ฅผ ํ™•์ธํ•ด๋ณด์ž!

 

 

 

 

 

 

๋ฐ˜์‘ํ˜•
profile

๐Ÿ‘จ‍๐Ÿ’ป kimtongting

@kimtongting ์ž…๋‹ˆ๋‹ค

ํฌ์ŠคํŒ…์ด ์ข‹์•˜๋‹ค๋ฉด "์ข‹์•„์š”โค๏ธ" ๋˜๋Š” "๊ตฌ๋…๐Ÿ‘๐Ÿป" ํ•ด์ฃผ์„ธ์š”!