IT๊ณต๋ถ€์ผ๊ธฐ
article thumbnail

๐Ÿ›  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);
    }
}