테스트 실패 대응
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user