InfrastructureProperties
인프라스트럭처 속성 설정. 외부 서비스 연결 정보 관리.
클래스 정의
@ConfigurationProperties(prefix = "infrastructure")
data class InfrastructureProperties(
@NestedConfigurationProperty val adapter: InternalProperties,
@NestedConfigurationProperty val booking: InternalProperties,
@NestedConfigurationProperty val city: InternalProperties,
@NestedConfigurationProperty val flight: InternalProperties,
@NestedConfigurationProperty val pricing: InternalProperties,
@NestedConfigurationProperty val airRecommendation: InternalProperties,
@NestedConfigurationProperty val recommendation: InternalProperties,
@NestedConfigurationProperty val billing: InternalProperties,
@NestedConfigurationProperty val airConsole: InternalProperties,
@NestedConfigurationProperty val naver: NaverProperties,
)포함 DTO
InternalProperties
data class InternalProperties(
val internalEndpoint: String,
@DefaultValue("3000") val fuelTimeout: Int = 3000,
)| 필드 | 타입 | 기본값 | 설명 |
|---|---|---|---|
internalEndpoint | String | - | 내부 서비스 엔드포인트 |
fuelTimeout | Int | 3000 | HTTP 타임아웃 (ms) |
NaverProperties
data class NaverProperties(
val internalEndpoint: String,
val fuelTimeout: Int,
val apiEndpoint: String,
val channels: List<Channel>,
)네이버 API 연동용 설정. 채널별 인증 정보 포함.
Channel (내부 클래스)
| 필드 | 설명 |
|---|---|
channel | 채널 식별자 |
agentId | 에이전트 ID |
password | 비밀번호 |
clientId | 클라이언트 ID |
clientSecret | 클라이언트 시크릿 |
subClientId | 서브 클라이언트 ID (선택) |
subClientSecret | 서브 클라이언트 시크릿 (선택) |
hmacSecret | HMAC 시크릿 (선택) |
consumerId | 소비자 ID (선택) |
메서드
getPropertyByChannel()
fun getPropertyByChannel(channel: String): Channel채널명으로 네이버 설정 조회. 없으면 InternationalSearchException 발생.
설정 예시
infrastructure:
adapter:
internal-endpoint: http://air-intl-adapter
fuel-timeout: 5000
naver:
api-endpoint: https://api.naver.com
channels:
- channel: NAVER
agent-id: xxx
password: xxx특징
- @NestedConfigurationProperty: 중첩 설정 바인딩
- 채널별 설정: 네이버 다중 채널 지원
- 기본 타임아웃: 3초