From f0cffdf9da6bbf24065569bdf55098287db7663a Mon Sep 17 00:00:00 2001 From: Rinjae Date: Wed, 26 Nov 2025 12:02:08 +0900 Subject: [PATCH] =?UTF-8?q?KjbProperty=20=ED=83=80=EC=9E=85=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eactive/ext/kjb/common/KjbProperty.java | 2 +- .../ext/kjb/ums/test/KjbPropertyTest.java | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/test/java/com/eactive/ext/kjb/ums/test/KjbPropertyTest.java diff --git a/src/main/java/com/eactive/ext/kjb/common/KjbProperty.java b/src/main/java/com/eactive/ext/kjb/common/KjbProperty.java index 7b3459b..4348662 100644 --- a/src/main/java/com/eactive/ext/kjb/common/KjbProperty.java +++ b/src/main/java/com/eactive/ext/kjb/common/KjbProperty.java @@ -73,7 +73,7 @@ public class KjbProperty { @KjbPropertyValue(key = "kjb.obp.url") @Pattern(regexp = "^(https?://[^\\s/$.?#][^\\s]*)|\\s*$", message = "kjb.obp.url 는 유효한 URL 형식이거나 공백이어야 합니다. 예: http://example.com/api") - private int obpUrl; + private String obpUrl; @KjbPropertyValue(key = "kjb.obp.trust_system.key", defaultValue = "x-obp-trust-system") @NotEmpty diff --git a/src/test/java/com/eactive/ext/kjb/ums/test/KjbPropertyTest.java b/src/test/java/com/eactive/ext/kjb/ums/test/KjbPropertyTest.java new file mode 100644 index 0000000..9bf6d78 --- /dev/null +++ b/src/test/java/com/eactive/ext/kjb/ums/test/KjbPropertyTest.java @@ -0,0 +1,28 @@ +package com.eactive.ext.kjb.ums.test; + +import com.eactive.ext.kjb.common.KjbProperty; +import com.eactive.ext.kjb.utils.ValidationUtil; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +@Slf4j +public class KjbPropertyTest { + + @Test + void testKjbProperty() { + Assumptions.assumeTrue( + "true".equalsIgnoreCase(System.getenv("KJB_EAPIM_TEST_ENABLED")), + "OS 환경변수 내 KJB_EAPIM_TEST_ENABLED=TRUE 설정되어 있어야 동작함"); + + + log.info("KjbProperty 테스트 시작"); + + + log.info("기본값 Validation 테스트"); + KjbProperty prop = new KjbProperty(); + ValidationUtil.validateOrThrow(prop); + + log.info("KjbProperty 테스트 완료"); + } +}