Jun Bank MSA의 중앙 설정 관리 서버입니다.
- 모든 마이크로서비스의 설정 중앙 관리
- Git 저장소 기반 설정 파일 관리
- 환경별 설정 분리 (local, dev, prod)
- 설정 변경 시 동적 갱신 지원
| 항목 |
버전 |
| Java |
21 |
| Spring Boot |
4.0.0 |
| Spring Cloud |
2025.1.0 |
| Spring Cloud Config |
5.0.x |
./gradlew clean bootJar
docker build -t ghcr.io/jun-bank/config-server:latest .
┌─────────────────────────────────────────────────┐
│ GitHub │
│ ┌───────────────────────────────────────────┐ │
│ │ config-repo │ │
│ │ configs/ │ │
│ │ ├── common/application.yml │ │
│ │ ├── gateway-server/application.yml │ │
│ │ ├── account-service/application.yml │ │
│ │ └── ... │ │
│ └───────────────────────────────────────────┘ │
└─────────────────────────────────────────────────┘
│
▼
┌─────────────────┐
│ Config Server │
│ :8888 │
└─────────────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Gateway │ │ Account │ │ User │
│ Server │ │ Service │ │ Service │
└─────────┘ └─────────┘ └─────────┘
| 서비스 |
포트 |
| config-server |
8888 |
| 엔드포인트 |
설명 |
/{application}/{profile} |
서비스별 설정 조회 |
/{application}/{profile}/{label} |
특정 브랜치 설정 조회 |
/actuator/health |
헬스 체크 |
/actuator/refresh |
설정 갱신 |
# gateway-server의 local 프로파일 설정 조회
curl http://localhost:8888/gateway-server/local
# account-service의 prod 프로파일 설정 조회
curl http://localhost:8888/account-service/prod
config-server/
├── src/
│ └── main/
│ ├── java/
│ │ └── com/junbank/configserver/
│ │ └── ConfigServerApplication.java
│ └── resources/
│ ├── application.yml
│ └── logback-spring.xml
├── build.gradle
├── settings.gradle
├── Dockerfile
└── README.md
Config Server는 다음 경로에서 설정을 검색합니다:
search-paths:
- configs/common
- configs/{application}
- configs/{application}/{profile}
Eureka Server (8761, 8762)
▲
│ 등록
│
Config Server (8888)
Config Server는 Eureka Server가 먼저 기동되어야 합니다.