๐ build.gradle ํ์ผ ์์
// 1.
plugins {
id 'java'
id 'org.springframework.boot' version '3.0.2'
id 'io.spring.dependency-management' version '1.1.0'
}
// 2.
group = 'me.kimhyeseung'
version = '1.0'
sourceCompatibility = '17'
// 3.
repositories {
mavenCentral()
}
// 4.
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
}
1. ํ๋ก์ ํธ์ ์ฌ์ฉํ ํ๋ฌ๊ทธ์ธ์ธ ์คํ๋ง ๋ถํธ ํ๋ฌ๊ทธ์ธ org.springframework.boot์
์คํ๋ง์ ์์กด์ฑ์ ์๋ ๊ด๋ฆฌํ๋ spring.dependency-management ์ถ๊ฐ
2. ์๋ฐ ์์ค ์ปดํ์ผํ ๋ ์ฌ์ฉํ ์๋ฐ ๋ฒ์ 17 ์ ๋ ฅ
3. ์์กด์ฑ์ ๋ฐ์ ์ ์ฅ์ ์ง์ (๊ธฐ๋ณธ๊ฐ : mavenCentral)
4. ํ๋ก์ ํธ๋ฅผ ๊ฐ๋ฐํ๋ฉฐ ํ์ํ ๊ธฐ๋ฅ์ ์์กด์ฑ ์ ๋ ฅ
์น ๊ด๋ จ ๊ธฐ๋ฅ ์ ๊ณตํ๋ spring-boot-starter-web๊ณผ
ํ ์คํธ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ spring-boot-starter-test ์ถ๊ฐ
โ ๋ฉ์ธ ํด๋์ค ์์ฑ
package org.kimhyeseung.springbootdeveloper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringBootDeveloperApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootDeveloperApplication.class, args);
}
}
