-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
55 lines (45 loc) · 1.81 KB
/
Copy pathbuild.gradle
File metadata and controls
55 lines (45 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
plugins {
id 'java'
/*id 'org.springframework.boot' version '3.5.9'
id 'io.spring.dependency-management' version '1.1.7'*/
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
description = 'Demo project for Spring Boot'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
dependencies {
// implementation 'org.springframework.boot:spring-boot-starter'
/* Spring IoC 컨테이너 + Mockito 테스트를 위한 의존성 추가 */
// Spring IoC 컨테이너
implementation 'org.springframework:spring-context:6.2.0'
// Spring Test (ApplicationContext 로딩, @ExtendWith 등)
testImplementation 'org.springframework:spring-test:6.2.0'
// Mockito
testImplementation 'org.mockito:mockito-core:5.11.0' // Mockito.mock, @Mock, @InjectionMock ...
testImplementation 'org.mockito:mockito-junit-jupiter:5.11.0' // @ExtendWith(MockitoExtension.class)
/* ****************************************************** */
// starter를 안쓰기 때문에 버전을 명시적으로 설정
runtimeOnly 'com.mysql:mysql-connector-j:8.3.0'
// JUnit 5 (테스트 프레임워크) 순수 자바 테스트는 junit-jupiter만 있으면 충분
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
// 테스트 런처 (IDE나 Gradle이 테스트를 실행할 때 필요)
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// (선택) AssertJ: JUnit의 기본 assertion보다 더 직관적인 테스트 작성
testImplementation 'org.assertj:assertj-core:3.25.3'
// testImplementation 'org.springframework.boot:spring-boot-starter-test'
// testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
tasks.named('test') {
useJUnitPlatform()
}
tasks.withType(JavaCompile).configureEach {
// getParameterNames() 사용을 위한 설정
options.compilerArgs.add("-parameters")
}