Skip to content

Commit 32cb621

Browse files
authored
Merge pull request #2 from CampusTable/20260102_#1_프로젝트_멀티모듈_구조_도입
20260102 #1 프로젝트 멀티모듈 구조 도입
2 parents 6011fa6 + 5f39fec commit 32cb621

19 files changed

Lines changed: 362 additions & 88 deletions

File tree

.coderabbit.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
language: "ko-KR"
3+
ignored_branch: ""
4+
early_access: false
5+
reviews:
6+
profile: "chill"
7+
request_changes_workflow: false
8+
high_level_summary: true
9+
poem: true
10+
review_status: true
11+
collapse_walkthrough: false
12+
auto_review:
13+
enabled: true
14+
drafts: false
15+
base_branches:
16+
- test
17+
chat:
18+
auto_reply: true

.github/workflows/spring-boot-cicd.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ jobs:
4343
- name: Gradle Wrapper 실행권한 부여
4444
run: chmod +x gradlew
4545

46-
# application-prod.yml 파일을 빌드 전에 생성
47-
- name: Create application-prod.yml from secret
46+
- name: application-prod.yml 파일 생성
4847
run: |
49-
mkdir -p src/main/resources
50-
cat << 'EOF' > ./src/main/resources/application-prod.yml
51-
${{ secrets.APPLICATION_PROD_YML }}
52-
EOF
48+
echo "${{ secrets.APPLICATION_PROD_YML }}" > CT-web/src/main/resources/application-prod.yml
49+
50+
- name: config-imports.yml 파일 생성
51+
run: |
52+
echo "${{ secrets.CONFIG_IMPORTS_YML }}" > CT-web/src/main/resources/config-imports.yml
5353
5454
# 브랜치 별 active profile 설정
5555
- name: Decide active profile

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ out/
4040
.kotlin
4141

4242
### ENV ###
43-
application-*.yml
43+
CT-web/src/main/resources/application-*.yml
44+
CT-web/src/main/resources/config-imports.yml
45+
CT-web/src/main/resources/springdoc.yml

CT-auth/build.gradle.kts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
plugins {
2+
id("java-library")
3+
}
4+
5+
tasks.bootJar {
6+
enabled = false
7+
}
8+
9+
tasks.jar {
10+
enabled = true
11+
archiveClassifier.set("")
12+
}
13+
14+
dependencies {
15+
implementation(project(":CT-common"))
16+
17+
api(libs.spring.boot.starter.security)
18+
api(libs.spring.security.test)
19+
}
20+

CT-common/build.gradle.kts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
plugins {
2+
id("java-library")
3+
}
4+
5+
tasks.bootJar {
6+
enabled = false
7+
}
8+
9+
tasks.jar {
10+
enabled = true
11+
archiveClassifier.set("")
12+
}
13+
14+
// common 모듈 api 의존성은 모든 모듈에 적용
15+
dependencies {
16+
// Spring Starter Web
17+
api(libs.spring.boot.starter.web)
18+
19+
// JPA
20+
api(libs.spring.boot.starter.data.jpa)
21+
22+
// Validation
23+
api(libs.spring.boot.starter.validation)
24+
25+
// Jackson
26+
api(libs.jackson.module.kotlin)
27+
28+
api(libs.kotlin.reflect)
29+
api(libs.kotlin.stdlib)
30+
}
31+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.chuseok22.ctcommon.core.util
2+
3+
/**
4+
* null 또는 빈 문자열을 기본값으로 대체
5+
*/
6+
fun String?.nvl(fallback: String): String {
7+
return when {
8+
this == null -> fallback
9+
this == "null" -> fallback
10+
this.isBlank() -> fallback
11+
else -> this
12+
}
13+
}

CT-member/build.gradle.kts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
plugins {
2+
id("java-library")
3+
}
4+
5+
tasks.bootJar {
6+
enabled = false
7+
}
8+
9+
tasks.jar {
10+
enabled = true
11+
archiveClassifier.set("")
12+
}
13+
14+
dependencies {
15+
implementation(project(":CT-common"))
16+
17+
// Postgres
18+
api(libs.postgresql)
19+
}

CT-web/build.gradle.kts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
plugins {
2+
id("java-library")
3+
id("org.springframework.boot")
4+
}
5+
6+
dependencies {
7+
implementation(project(":CT-auth"))
8+
implementation(project(":CT-common"))
9+
implementation(project(":CT-member"))
10+
11+
implementation(libs.swagger.ui)
12+
implementation(libs.http.logging)
13+
implementation(libs.api.change.log)
14+
}
15+

src/main/kotlin/com/chuseok22/campustableserver/CampusTableServerApplication.kt renamed to CT-web/src/main/kotlin/com/chuseok22/ctweb/CampusTableServerApplication.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.chuseok22.campustableserver
1+
package com.chuseok22.ctweb
22

33
import org.springframework.boot.autoconfigure.SpringBootApplication
44
import org.springframework.boot.runApplication
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.chuseok22.ctweb.infrastructure.config
2+
3+
import org.springframework.context.annotation.ComponentScan
4+
import org.springframework.context.annotation.Configuration
5+
6+
@Configuration
7+
@ComponentScan(basePackages = [
8+
"com.chuseok22.*"
9+
])
10+
class ComponentScanConfig {
11+
}

0 commit comments

Comments
 (0)