|
|
@@ -44,11 +44,11 @@ public class SafetyKoreaApi {
|
|
|
|
|
|
@PostConstruct
|
|
|
public void init() {
|
|
|
- log.debug("\n\n---- SafetyKoreaApi initialization started ----");
|
|
|
- log.debug("apiUrl: [{}]", apiUrl);
|
|
|
- log.debug("apiDetailUrl: [{}]", apiDetailUrl);
|
|
|
- log.debug("authKey: [{}]", authKey);
|
|
|
- log.debug("\n--- SafetyKoreaApi initialization completed ----\n");
|
|
|
+ log.info("\n\n---- SafetyKoreaApi initialization started ----");
|
|
|
+ log.info("apiUrl: [{}]", apiUrl);
|
|
|
+ log.info("apiDetailUrl: [{}]", apiDetailUrl);
|
|
|
+ log.info("authKey: [{}]", authKey);
|
|
|
+ log.info("\n--- SafetyKoreaApi initialization completed ----\n");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -67,7 +67,7 @@ public class SafetyKoreaApi {
|
|
|
log.info("requestUrl: {}", requestUrl);
|
|
|
URI url = URI.create(requestUrl);
|
|
|
|
|
|
- String responseJson = getExtracted( url);
|
|
|
+ String responseJson = getExtracted(url);
|
|
|
|
|
|
Gson gson = new Gson();
|
|
|
KCertifyNo kcNo = gson.fromJson(responseJson, KCertifyNo.class);
|
|
|
@@ -75,7 +75,7 @@ public class SafetyKoreaApi {
|
|
|
if (kcNo.getResultCode() != null && "2000".equals(kcNo.getResultCode())) { // 성공
|
|
|
result.set("certNum", kcNo.getResultData().iterator().next().getCertNum());
|
|
|
result.set("certDiv", kcNo.getResultData().iterator().next().getCertDiv());
|
|
|
- result.set("certOrganName", kcNo.getResultData().iterator().next().getCertOrganName());
|
|
|
+ result.set("certOrganName", kcNo.getResultData().iterator().next().getCertOrganName());
|
|
|
result.set("certState", kcNo.getResultData().iterator().next().getCertState());
|
|
|
result.set("certDt", kcNo.getResultData().iterator().next().getCertDate());
|
|
|
return result;
|
|
|
@@ -84,7 +84,6 @@ public class SafetyKoreaApi {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* KC인증번호로 조회
|
|
|
* @param certNum - 인증번호
|
|
|
@@ -100,7 +99,7 @@ public class SafetyKoreaApi {
|
|
|
String requestUrl = apiDetailUrl + "?certNum=" + certNum;
|
|
|
URI url = URI.create(requestUrl);
|
|
|
|
|
|
- String responseJson = getExtracted( url);
|
|
|
+ String responseJson = getExtracted(url);
|
|
|
|
|
|
Gson gson = new Gson();
|
|
|
KCertifyNoOnly kcNo = gson.fromJson(responseJson, KCertifyNoOnly.class);
|
|
|
@@ -126,7 +125,7 @@ public class SafetyKoreaApi {
|
|
|
* @author eskim
|
|
|
* @since 2020. 12. 07
|
|
|
*/
|
|
|
- private String getExtracted( URI url) {
|
|
|
+ private String getExtracted(URI url) {
|
|
|
|
|
|
String responseJson = "";
|
|
|
// Header
|