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,
)
필드타입기본값설명
internalEndpointString-내부 서비스 엔드포인트
fuelTimeoutInt3000HTTP 타임아웃 (ms)
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서브 클라이언트 시크릿 (선택)
hmacSecretHMAC 시크릿 (선택)
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초