Spring

start.spring.io๋กœ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ

vividswan 2022. 3. 8. 01:48

start.spring.io

start.spring.io๋กœ ์†์‰ฝ๊ฒŒ ์Šคํ”„๋ง ํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“ค์–ด๋ณธ๋‹ค.

์ ‘์†

์ฃผ์†Œ์ฐฝ์— https://start.spring.io/๋ฅผ ์ž…๋ ฅํ•œ ๋’ค ์ ‘์†ํ•œ๋‹ค.

์•„๋ž˜์™€ ๊ฐ™์€ ํ™”๋ฉด์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.


ํ•˜๋‚˜ํ•˜๋‚˜ ์ฒดํฌํ•ด์„œ ์„ค์ •์„ ํ•  ์ˆ˜ ์žˆ๋‹ค.

์š”์†Œ


ํ”„๋กœ์ ํŠธ๊ฐ€ Maven ์ธ์ง€, Gradle ์ธ์ง€ ์„ค์ •ํ•œ๋‹ค.

ํ”„๋กœ๊ทธ๋žจ ์–ธ์–ด๋ฅผ ์„ค์ •ํ•œ๋‹ค.

์Šคํ”„๋ง ๋ถ€ํŠธ์˜ ๋ฒ„์ „๋„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.

SNAPSHOT์€ ์•ˆ์ •ํ™”๋˜์ง€ ์•Š์€ ๋ฒ„์ „, M ์€ ์ •ํ•ด์ง„ ์ฃผ๊ธฐ๋งˆ๋‹ค ๋ฐฐํฌ๋˜๋Š” ๋ฒ„์ „, ์•„๋ฌด๊ฒƒ๋„ ์•ˆ ์“ฐ์—ฌ์žˆ์œผ๋ฉด ์ •์‹ ๋ฒ„์ „์ด๋‹ค.


ํ”„๋กœ์ ํŠธ์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ์ž…๋ ฅํ•˜๊ณ , Jar, War์˜ ํŒจํ‚ค์ง•, JDK ๋ฒ„์ „์„ ์„ค์ •ํ•œ๋‹ค.


์˜์กด์„ฑ์„ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋‹ค.

Spring Web๊ณผ Thymeleaf๋ฅผ ์ถ”๊ฐ€ํ•˜์˜€๋‹ค.

ํ•˜๋‹จ์˜ GENERATE๋ฅผ ๋ˆ„๋ฅธ ๋’ค ์ƒ์„ฑ๋œ ํŒŒ์ผ์„ import ํ•˜์—ฌ ์—ด์–ด์ฃผ๋ฉด ์ƒ์„ฑ๋œ๋‹ค.

intellij์˜ ๊ฒฝ์šฐ์—” ์ดˆ๊ธฐ ํ™”๋ฉด์˜ Open or Import๋กœ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค.

gradle

์ƒ์„ฑ๋œ ํ”„๋กœ์ ํŠธ์˜ build.gradle ํŒŒ์ผ์„ ์—ด์–ด๋ณด๋ฉด ์„ค์ •ํ–ˆ๋˜ ํ”„๋กœ์ ํŠธ์˜ ์ •๋ณด์™€ ์˜์กด์„ฑ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

plugins {
    id 'org.springframework.boot' version '2.3.2.RELEASE'
    id 'io.spring.dependency-management' version '1.0.9.RELEASE'
    id 'java'
}

group = 'com.vividswan.simple'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    testImplementation('org.springframework.boot:spring-boot-starter-test') {
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
    }
}

test {
    useJUnitPlatform()
}