테스트 실패 대응

This commit is contained in:
Rinjae
2025-10-22 21:10:18 +09:00
parent 3b7c4d4683
commit 1928579717
4 changed files with 9 additions and 10 deletions
@@ -11,7 +11,6 @@ import com.eactive.ext.kjb.utils.ValidationUtil;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.hc.client5.http.classic.methods.HttpPost;
import org.apache.hc.client5.http.config.RequestConfig;
@@ -52,7 +51,7 @@ public class KjbUmsService {
throw new IllegalArgumentException("property is null");
}
isRealMode = property.getUmsUrl() != null && StringUtils.isNotEmpty(property.getUmsUrl().trim());
isRealMode = property.getUmsHostUrl() != null && StringUtils.isNotEmpty(property.getUmsHostUrl().trim());
if (isRealMode) {
ValidationUtil.validateOrThrow(property);
@@ -84,7 +83,7 @@ public class KjbUmsService {
content = VerifyPhoneUmsTemplate.builder().authNumber(messageRequest.getMessage()).build();
String umsMessageId = this.sendKakaoAlimTalk(messageRequest.getId(),
UmzBizWorkCode.VERIFY_PHONE,
UmsBizWorkCode.VERIFY_PHONE,
messageRequest.getPhone(),
content
);
@@ -94,7 +93,7 @@ public class KjbUmsService {
return true;
}
public String sendKakaoAlimTalk(String guid, UmzBizWorkCode bizWorkCode, String cpno, IUmsGsonObject content) {
public String sendKakaoAlimTalk(String guid, UmsBizWorkCode bizWorkCode, String cpno, IUmsGsonObject content) {
if (content == null) {
throw new IllegalArgumentException("content is null");
}
@@ -140,7 +139,7 @@ public class KjbUmsService {
Gson gson = new Gson();
String json = gson.toJson(requestPayload);
HttpPost httpPost = new HttpPost(property.getUmsUrl() + url);
HttpPost httpPost = new HttpPost(property.getUmsHostUrl() + url);
httpPost.setHeader("Content-Type", CONTENT_TYPE);
httpPost.setHeader("Authorization", String.format(AUTHORIZATION_FMT, property.getUmsApiKey()));
httpPost.setEntity(EntityBuilder.create().setText(json).setContentType(ContentType.APPLICATION_JSON).build());