유연성
성능 최적화
멀티 프로젝트 빌드 지원
설정 주입 방식
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.5'
id 'io.spring.dependency-management' version '1.1.3'
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
runtimeOnly 'com.mysql:mysql-connector-j'
}
repositories {
mavenCentral()
}
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.5'
id 'io.spring.dependency-management' version '1.1.3'
}
java 플러그인: Java 프로젝트를 위한 기본 빌드 기능 제공spring-boot 플러그인: Spring Boot 애플리케이션을 실행할 수 있도록 설정dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
runtimeOnly 'com.mysql:mysql-connector-j'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
| 설정 옵션 | 설명 |
|---|---|
implementation | 컴파일 & 런타임 모두에서 사용 |
compileOnly | 컴파일할 때만 사용 (런타임 미포함) |
runtimeOnly | 런타임에서만 사용 (컴파일 미포함) |
testImplementation | 테스트 환경에서만 사용 |
repositories {
mavenCentral()
}
mavenCentral(): Maven Central Repository에서 라이브러리를 다운로드