-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
151 lines (127 loc) · 5.36 KB
/
Copy pathbuild.gradle
File metadata and controls
151 lines (127 loc) · 5.36 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
plugins {
id 'java'
id 'org.springframework.boot' version '3.5.7'
id 'io.spring.dependency-management' version '1.1.7'
}
group = 'com.early_express'
version = '0.0.1-SNAPSHOT'
description = 'Demo project for Spring Boot'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
ext {
set('springCloudVersion', "2025.0.0")
set('queryDslVersion', "5.1.0")
set('archUnitVersion', "1.3.0")
}
dependencies {
// ===== Spring Boot Core =====
// 애플리케이션 모니터링 및 헬스체크 엔드포인트 제공
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// 웹 애플리케이션 개발을 위한 스타터
implementation 'org.springframework.boot:spring-boot-starter-web'
// WebClient를 위한 WebFlux (반응형 웹 클라이언트)
implementation 'org.springframework:spring-webflux'
// ===== Security =====
// Spring Security 기본
implementation 'org.springframework.boot:spring-boot-starter-security'
// OAuth 2.0 클라이언트
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
// OAuth 2.0 리소스 서버
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
// ===== Spring Cloud - MSA 기본 구성 =====
// 외부 설정 서버로부터 설정 정보를 가져옴
implementation 'org.springframework.cloud:spring-cloud-starter-config'
// Eureka 서비스 디스커버리 클라이언트
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
// 클라이언트 사이드 로드밸런싱
implementation 'org.springframework.cloud:spring-cloud-starter-loadbalancer'
// 선언적 REST 클라이언트
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
// ===== Message Queue - Kafka =====
// Kafka 메시징 지원
implementation 'org.springframework.kafka:spring-kafka'
// Spring Cloud Stream과 Kafka 바인더
implementation 'org.springframework.cloud:spring-cloud-starter-stream-kafka'
// Kafka Streams 지원 (필요시 사용)
implementation 'org.apache.kafka:kafka-streams'
// ===== Observability =====
// 분산 추적을 위한 Brave 트레이싱 브릿지
implementation 'io.micrometer:micrometer-tracing-bridge-brave'
// Zipkin으로 트레이스 데이터 전송
implementation 'io.zipkin.reporter2:zipkin-reporter-brave'
// Loki로 로그 전송을 위한 Logback 어펜더
implementation 'com.github.loki4j:loki-logback-appender:2.0.0'
// Prometheus 메트릭 수집
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
// ===== Database =====
// JPA ORM 지원
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// PostgreSQL JDBC 드라이버
runtimeOnly 'org.postgresql:postgresql'
// PostgreSQL Vector 확장 지원 (pgvector)
implementation 'com.pgvector:pgvector:0.1.6'
// ===== QueryDSL =====
// 타입 세이프한 쿼리 작성을 위한 QueryDSL
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}:jakarta"
annotationProcessor "com.querydsl:querydsl-apt:${queryDslVersion}:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
// ===== Testing =====
// 아키텍처 테스트를 위한 ArchUnit
testImplementation "com.tngtech.archunit:archunit-junit5:${archUnitVersion}"
// Spring Boot 테스트 스타터
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// Spring Security 테스트
testImplementation 'org.springframework.security:spring-security-test'
// Kafka 테스트 지원
testImplementation 'org.springframework.kafka:spring-kafka-test'
// H2 인메모리 데이터베이스 (테스트용)
testImplementation 'com.h2database:h2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// ===== Utilities =====
// Lombok - 보일러플레이트 코드 자동 생성
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// 개발 시 자동 재시작 지원
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
// ===== Environment Variables =====
// .env 파일에서 환경변수 로드
implementation 'io.github.cdimascio:dotenv-java:3.1.0'
// ===== API Documentation =====
// Swagger/OpenAPI 문서 자동 생성
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.4'
// ===== REDIS =====
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
// ==== OpenFeign
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
tasks.named('test') {
useJUnitPlatform()
}
tasks.named('bootRun') {
systemProperty 'java.net.preferIPv4Stack', 'true'
systemProperty 'java.net.preferIPv6Addresses', 'false'
}
// QueryDSL Q클래스 생성 경로 설정
def querydslDir = "$buildDir/generated/querydsl"
sourceSets {
main.java.srcDir querydslDir
}
configurations {
querydsl.extendsFrom compileClasspath
}
clean {
delete file(querydslDir)
}