From 028185204ed5daaf047582c3f994f91c3fcee48f Mon Sep 17 00:00:00 2001 From: pricelees Date: Tue, 15 Jul 2025 18:31:54 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20PaymentProperties=EC=97=90=20API=20?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=20=EA=B2=BD=EB=A1=9C=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B0=8F=20=EC=BD=94=ED=8B=80=EB=A6=B0=20=EB=A7=88=EC=9D=B4?= =?UTF-8?q?=EA=B7=B8=EB=A0=88=EC=9D=B4=EC=85=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/PaymentProperties.kt | 34 +++++-------------- src/main/resources/application.yaml | 1 + 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/src/main/java/roomescape/payment/infrastructure/client/PaymentProperties.kt b/src/main/java/roomescape/payment/infrastructure/client/PaymentProperties.kt index cd5e047d..06758eb8 100644 --- a/src/main/java/roomescape/payment/infrastructure/client/PaymentProperties.kt +++ b/src/main/java/roomescape/payment/infrastructure/client/PaymentProperties.kt @@ -1,29 +1,11 @@ -package roomescape.payment.infrastructure.client; +package roomescape.payment.infrastructure.client -import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.ConfigurationProperties @ConfigurationProperties(prefix = "payment") -public class PaymentProperties { - - private final String confirmSecretKey; - private final int readTimeout; - private final int connectTimeout; - - public PaymentProperties(String confirmSecretKey, int readTimeout, int connectTimeout) { - this.confirmSecretKey = confirmSecretKey; - this.readTimeout = readTimeout; - this.connectTimeout = connectTimeout; - } - - public String getConfirmSecretKey() { - return confirmSecretKey; - } - - public int getReadTimeout() { - return readTimeout; - } - - public int getConnectTimeout() { - return connectTimeout; - } -} +data class PaymentProperties( + @JvmField val apiBaseUrl: String, + @JvmField val confirmSecretKey: String, + @JvmField val readTimeout: Int, + @JvmField val connectTimeout: Int +) diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index b704da5f..82422963 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -25,6 +25,7 @@ security: expire-length: 1800000 # 30 분 payment: + api-base-url: https://api.tosspayments.com confirm-secret-key: test_gsk_docs_OaPz8L5KdmQXkzRz3y47BMw6 read-timeout: 3 connect-timeout: 30