๋ ์ง:2025-10-22
์์ ์๋
๋ฑ์ ๋ณต์กํ ๊ณผ์ ์ด ํ์ํ์ง๋ง,
Spring Initializr๋ฅผ ์ฌ์ฉํ๋ฉด ๋ช ๋ฒ์ ํด๋ฆญ๋ง์ผ๋ก
์คํ ๊ฐ๋ฅํ ์คํ๋ง ๋ถํธ ํ๋ก์ ํธ๋ฅผ ๋ฐ๋ก ๋ง๋ค ์ ์์ต๋๋ค.
์์กด์ฑ(Dependency)์ ํ๋ก์ ํธ ์คํ์ ํ์ํ ์ธ๋ถ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์๋ฏธํฉ๋๋ค.
์ฝ๊ฒ ๋งํด, โ์ฐ๋ฆฌ ํ๋ก์ ํธ๊ฐ ์์กดํ๋ ์ธ๋ถ ์ฝ๋๋คโ
๋ชจ๋ ๊ธฐ๋ฅ์ ์ง์ ๊ตฌํํ๋ ๋์ , ์ด๋ฏธ ๊ฒ์ฆ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ๊ฐ์ ธ์ ์ฌ์ฉํ๋ ๋ฐฉ์์ ๋๋ค.
์์ ์๋ .jar ํ์ผ์ ์ง์ ๋ค์ด๋ก๋ํด์ ์ถ๊ฐํ์ง๋ง,
์ง๊ธ์ Maven์ด๋ Gradle ๊ฐ์ ๋น๋ ๊ด๋ฆฌ ๋๊ตฌ๊ฐ ์๋์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค.
์คํ๋ง ๋ถํธ ์ ๊ท ํ๋ก์ ํธ์์๋ ์ผ๋ฐ์ ์ผ๋ก Gradle์ ์ฌ์ฉํฉ๋๋ค.
| ๊ตฌ๋ถ | Maven | Gradle |
|---|---|---|
| ์ค์ ํ์ผ | pom.xml | build.gradle |
| ์ธ์ด | XML | Groovy / Kotlin |
| ํน์ง | ์ ์ ์ธ ์ค์ , ๋ฌธ๋ฒ์ด ๋ค์ ๊ธธ๋ค | ๋์ ์ค์ , ๊ฐ๊ฒฐํ๊ณ ์ ์ฐ |
| ์์ XML ๊ธฐ๋ฐ ์ ์ธ | ์ฝ๋ ๊ธฐ๋ฐ ์ค์ |
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
Maven Repository๋ ์ ์ธ๊ณ ๊ฐ๋ฐ์๋ค์ด ์ฌ์ฉํ๋ ์๋ฐ ๋ผ์ด๋ธ๋ฌ๋ฆฌ(JAR)์ ํ๋ฌ๊ทธ์ธ์ ๋ชจ์๋ ์จ๋ผ์ธ ์ ์ฅ์์ ๋๋ค.
์ฝ๊ฒ ๋งํ๋ฉด, โํ์ํ ์์กด์ฑ์ ์ฐพ์์ ๊ฐ์ ธ์ฌ ์ ์๋ ๊ฑฐ๋ํ ๋ถํ ์ฐฝ๊ณ โ
| ๊ตฌ๋ถ | ํต์ฌ | ๋ด์ฉ |
|---|---|---|
| Spring Initializr | ํ๋ก์ ํธ ๊ธฐ๋ณธ ๊ตฌ์กฐ๋ฅผ ๋น ๋ฅด๊ฒ ์์ฑํ๋ ๋๊ตฌ | |
| ์์กด์ฑ(Dependency) | ์ธ๋ถ ๋ผ์ด๋ธ๋ฌ๋ฆฌ, ํ๋ฌ๊ทธ์ธ ๋ฑ ํ์ํ ์ฝ๋ | |
| Maven/Gradle | ์์กด์ฑ์ ์๋์ผ๋ก ๊ด๋ฆฌํ๋ ๋น๋ ๋๊ตฌ | |
| Maven Repository | ์ ์ธ๊ณ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ๋ชจ์ฌ ์๋ ์ ์ฅ์ |