feat : 백엔드 아키텍처 리팩토링 및 코틀린 도입 #459
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
단일 모듈 구조에서 멀티모듈 구조로 마이그레이션하는 작업입니다.
1. 왜 멀티모듈인가?
새로운 프로젝트 구조
juinjang/
├── build.gradle.kts # 루트: 공통 설정, BOM 관리
├── settings.gradle # 모듈 정의
├── gradle/
│ └── libs.versions.toml # Version Catalog (의존성 버전 중앙 관리)
└── apps/
└── juinjang-api/ # API 모듈 (현재 모든 소스)
└── build.gradle.kts
Summary
기존 단일 모듈 Spring Boot 프로젝트를 Gradle 멀티모듈 구조로 전환하고, 빌드
시스템을 Kotlin DSL로 마이그레이션한 대규모 리팩터링입니다.
변경 개요
커밋: refactor: Gradle Kotlin DSL로 빌드 시스템 마이그레이션
설명: build.gradle → build.gradle.kts 전환, Groovy DSL에서 Kotlin DSL로
마이그레이션
────────────────────────────────────────
커밋: refactor: 멀티모듈 구조로 소스 코드 이동
설명: 기존 src/ 하위 소스를 apps/juinjang-api/ 모듈로 이동 (389개 파일)
────────────────────────────────────────
커밋: build: CI/CD 및 Docker 설정 멀티모듈 구조 반영
설명: GitHub Actions CI/CD 워크플로우 및 Dockerfile 경로를 멀티모듈 구조에 맞게
수정
────────────────────────────────────────
커밋: chore: EditorConfig 설정 추가
설명: 프로젝트 전체 코드 스타일 통일을 위한 .editorconfig 추가
────────────────────────────────────────
커밋: build: 루트 빌드 스크립트 및 버전 관리 체계 개편
설명: 루트 build.gradle.kts 전면 재작성, gradle.properties 버전 중앙 관리,
settings.gradle.kts pluginManagement 구성
────────────────────────────────────────
커밋: refactor: 공통 모듈 분리 (jpa, redis)
설명: BaseEntity, JpaConfig, QueryDslConfig, RedisConfig를 독립 라이브러리 모듈로
분리
────────────────────────────────────────
커밋: refactor: 지원 모듈 분리 (logging, monitoring)
설명: logback 설정 및 Actuator/Micrometer Prometheus 설정을 지원 모듈로 분리
────────────────────────────────────────
커밋: refactor: API 모듈 의존성 정리 및 설정 통합
설명: API 모듈에서 이동된 설정 제거, config import 기반 application.yml 통합,
TestContainers 적용
────────────────────────────────────────
커밋: fix: 타임존 Asia/Seoul 설정 추가
설명: Dockerfile TZ 환경변수 + JVM 옵션 + Application 레벨 타임존 설정
────────────────────────────────────────
커밋: chore: 로컬 개발 Docker Compose 환경 구성
설명: MySQL 8.0 + Redis 7.0 로컬 개발용 Docker Compose 추가
모듈 구조
juinjang (root)
├── apps/
│ └── juinjang-api/ # API 애플리케이션 (bootJar)
├── modules/
│ ├── jpa/ # JPA/QueryDSL 공통 설정 + BaseEntity + TestContainers
│ └── redis/ # Redis 공통 설정
├── supports/
│ ├── logging/ # Logback 설정 (프로필별 파일/콘솔 로깅)
│ └── monitoring/ # Actuator + Micrometer Prometheus 메트릭
└── docker/ # 로컬 개발 인프라 (MySQL, Redis)
주요 변경 사항
(jpa.yml)
프로필별 로깅)
spring.config.import: monitoring.yml, jpa.yml, redis.yml, logging.yml
Test plan
docker/infra-compose.yml up -d)