From f917df13cb973840bb8d5633c10c954f53fce837 Mon Sep 17 00:00:00 2001 From: Rinjae Date: Mon, 2 Feb 2026 15:32:22 +0900 Subject: [PATCH] =?UTF-8?q?BaseRestController=20-=20IP=20white=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9=20UMS=20=EC=97=B0=EB=8F=99=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/eactive/ext/kjb/common/KjbProperty.java | 8 ++++++++ src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java | 7 +++++++ .../ext/kjb/ums/gson/ObpMonitoringUmsTemplate.java | 8 ++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) 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 d469e85..1ff81e6 100644 --- a/src/main/java/com/eactive/ext/kjb/common/KjbProperty.java +++ b/src/main/java/com/eactive/ext/kjb/common/KjbProperty.java @@ -175,6 +175,14 @@ public class KjbProperty { private String smsAuthFixedValue = "654321"; + @KjbPropertyValue( + key = "kjb.api.allow_ip_list", + description = "API 접근 허용 IP 목록 (콤마(,)로 구분된 IP들, 예: 192.168.0.1, 192.168.1.*,127.*.*.*", + defaultValue = "10.15.106.*, 10.14.8.*, 10.15.8.*, 192.168.240.*, 127.0.0.1, 192.168.132.*, 192.168.131.*" + ) + private String apiAllowIpList = "10.15.106.*, 10.14.8.*, 10.15.8.*, 192.168.240.*, 127.0.0.1, 192.168.132.*, 192.168.131.*"; + + public String toJsonString(boolean isPretty) { return isPretty ? new GsonBuilder().setPrettyPrinting().create().toJson(this) diff --git a/src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java b/src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java index 281fee7..171c4e8 100644 --- a/src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java +++ b/src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java @@ -6,6 +6,7 @@ import com.eactive.ext.kjb.common.KjbProperty; import com.eactive.ext.kjb.common.KjbPropertyHolder; import com.eactive.ext.kjb.common.KjbUmsException; import com.eactive.ext.kjb.ums.gson.IUmsGsonObject; +import com.eactive.ext.kjb.ums.gson.ObpMonitoringUmsTemplate; import com.eactive.ext.kjb.ums.gson.UmsRequestPayload; import com.eactive.ext.kjb.ums.gson.VerifyPhoneUmsTemplate; import com.eactive.ext.kjb.utils.JsonUtil; @@ -113,6 +114,12 @@ public class KjbUmsService { return true; } + public String sendObpMonitoring(String cpno, String message) throws KjbUmsException { + log.info("OBP 모니터링 용 메세지 발송 - message: {}", message); + + return this.sendKakaoAlimTalk(null, UmsBizWorkCode.MONITORING, cpno, ObpMonitoringUmsTemplate.builder().message(message).build()); + } + public String sendKakaoAlimTalk(String guid, UmsBizWorkCode bizWorkCode, String cpno, IUmsGsonObject content) throws KjbUmsException { if (content == null) { throw new IllegalArgumentException("content is null"); diff --git a/src/main/java/com/eactive/ext/kjb/ums/gson/ObpMonitoringUmsTemplate.java b/src/main/java/com/eactive/ext/kjb/ums/gson/ObpMonitoringUmsTemplate.java index b384155..57d0f9f 100644 --- a/src/main/java/com/eactive/ext/kjb/ums/gson/ObpMonitoringUmsTemplate.java +++ b/src/main/java/com/eactive/ext/kjb/ums/gson/ObpMonitoringUmsTemplate.java @@ -1,8 +1,12 @@ package com.eactive.ext.kjb.ums.gson; import com.google.gson.annotations.SerializedName; +import lombok.Builder; +import lombok.Data; +@Data +@Builder public class ObpMonitoringUmsTemplate implements IUmsGsonObject { - @SerializedName("AUTH_NO") - private String authNumber; + @SerializedName("MOTR_EVAL_CNTN") + private String message; }