BaseRestController - IP white 적용

UMS 연동 코드 개선
This commit is contained in:
Rinjae
2026-02-02 15:32:22 +09:00
parent bb6c3d81e5
commit f917df13cb
3 changed files with 21 additions and 2 deletions
@@ -175,6 +175,14 @@ public class KjbProperty {
private String smsAuthFixedValue = "654321"; 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) { public String toJsonString(boolean isPretty) {
return isPretty return isPretty
? new GsonBuilder().setPrettyPrinting().create().toJson(this) ? new GsonBuilder().setPrettyPrinting().create().toJson(this)
@@ -6,6 +6,7 @@ import com.eactive.ext.kjb.common.KjbProperty;
import com.eactive.ext.kjb.common.KjbPropertyHolder; import com.eactive.ext.kjb.common.KjbPropertyHolder;
import com.eactive.ext.kjb.common.KjbUmsException; import com.eactive.ext.kjb.common.KjbUmsException;
import com.eactive.ext.kjb.ums.gson.IUmsGsonObject; 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.UmsRequestPayload;
import com.eactive.ext.kjb.ums.gson.VerifyPhoneUmsTemplate; import com.eactive.ext.kjb.ums.gson.VerifyPhoneUmsTemplate;
import com.eactive.ext.kjb.utils.JsonUtil; import com.eactive.ext.kjb.utils.JsonUtil;
@@ -113,6 +114,12 @@ public class KjbUmsService {
return true; 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 { public String sendKakaoAlimTalk(String guid, UmsBizWorkCode bizWorkCode, String cpno, IUmsGsonObject content) throws KjbUmsException {
if (content == null) { if (content == null) {
throw new IllegalArgumentException("content is null"); throw new IllegalArgumentException("content is null");
@@ -1,8 +1,12 @@
package com.eactive.ext.kjb.ums.gson; package com.eactive.ext.kjb.ums.gson;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
import lombok.Builder;
import lombok.Data;
@Data
@Builder
public class ObpMonitoringUmsTemplate implements IUmsGsonObject { public class ObpMonitoringUmsTemplate implements IUmsGsonObject {
@SerializedName("AUTH_NO") @SerializedName("MOTR_EVAL_CNTN")
private String authNumber; private String message;
} }