From f83b555036d82a488fd2c19866ac2045b5541c66 Mon Sep 17 00:00:00 2001 From: jaewohong Date: Tue, 23 Dec 2025 16:08:22 +0900 Subject: [PATCH 1/4] =?UTF-8?q?nice=20on=20=ED=98=B8=EC=B6=9C=EC=8B=9C=20B?= =?UTF-8?q?earer=EC=9D=84=20bearer=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapter/http/client/impl/HttpClient5AdapterServiceRest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/eactive/eai/adapter/http/client/impl/HttpClient5AdapterServiceRest.java b/src/main/java/com/eactive/eai/adapter/http/client/impl/HttpClient5AdapterServiceRest.java index d0e92da..9d8a195 100644 --- a/src/main/java/com/eactive/eai/adapter/http/client/impl/HttpClient5AdapterServiceRest.java +++ b/src/main/java/com/eactive/eai/adapter/http/client/impl/HttpClient5AdapterServiceRest.java @@ -725,7 +725,7 @@ public class HttpClient5AdapterServiceRest extends HttpClient5AdapterServiceSupp */ private void setNiceOnAuthHeaders(HttpUriRequestBase method, String auth) throws Exception { method.setHeader("Authorization", - String.format("%s %s", AccessTokenVO.BEARER_TYPE, auth)); // 나이스지키미 format임 + String.format("%s %s", "bearer", auth)); // 나이스지키미 format임, bearer을 소문자로 보내야함 String productId = PropManager.getInstance().getProperty("NiceOnProperty","productId.value"); method.setHeader("ProductID", productId); //method.setHeader("Authorization", From b2e6484c3464f089b063c1a7c3399416d9971a05 Mon Sep 17 00:00:00 2001 From: "Yunsam.Eo" Date: Fri, 26 Dec 2025 16:04:12 +0900 Subject: [PATCH 2/4] =?UTF-8?q?Http=20Adapter=20400=EC=9D=91=EB=8B=B5?= =?UTF-8?q?=EC=8B=9C=20300=EC=97=90=EC=84=9C=20=EC=88=98=EC=8B=A0=ED=95=9C?= =?UTF-8?q?=20Header=EC=9D=98=20Content-Type=20=EA=B7=B8=EB=8C=80=EB=A1=9C?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95=ED=95=98=EA=B2=8C=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/HttpAdapterServiceStandard.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eactive/eai/adapter/http/dynamic/impl/HttpAdapterServiceStandard.java b/src/main/java/com/eactive/eai/adapter/http/dynamic/impl/HttpAdapterServiceStandard.java index fc2da76..d3e1287 100644 --- a/src/main/java/com/eactive/eai/adapter/http/dynamic/impl/HttpAdapterServiceStandard.java +++ b/src/main/java/com/eactive/eai/adapter/http/dynamic/impl/HttpAdapterServiceStandard.java @@ -6,6 +6,7 @@ import com.eactive.eai.adapter.AdapterVO; import com.eactive.eai.adapter.Keys; import com.eactive.eai.adapter.http.HttpMemoryLogger; import com.eactive.eai.adapter.http.HttpStatusException; +import com.eactive.eai.adapter.http.dynamic.HttpAdapterServiceKey; import com.eactive.eai.adapter.http.dynamic.HttpAdapterServiceSupport; import com.eactive.eai.common.exception.ExceptionUtil; import com.eactive.eai.common.util.CommonLib; @@ -26,8 +27,11 @@ import java.net.URLDecoder; import java.util.ArrayList; import java.util.Collections; import java.util.Enumeration; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Properties; +import java.util.TreeMap; public class HttpAdapterServiceStandard extends HttpAdapterServiceSupport { @@ -218,8 +222,20 @@ public class HttpAdapterServiceStandard extends HttpAdapterServiceSupport if (addData.length() > 0){ responseData = addData + responseData; } - // UI와 통신시(UTF-8) 변환오류로 ENCODE 제거 - response.setContentType("text/plain"); + + // 300응답에서 받은 Header정보 사용하기 위해 읽어옴. + Map responsePropertyMap = new HashMap(); + responsePropertyMap = (Map) prop.get(OUTBOUND_PROPERTY_MAP); + Properties responseHeaders = (Properties)responsePropertyMap.get(OUTBOUND_RESPONSE_HEADERS); + Map responseHeaderMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); + // Properties 내용을 모두 복사 + for (String name : responseHeaders.stringPropertyNames()) { + responseHeaderMap.put(name, responseHeaders.getProperty(name)); + } + String contentTytpe = responseHeaderMap.get("Content-Type"); + + // UI와 통신시(UTF-8) 변환오류로 ENCODE 제거 + response.setContentType(contentTytpe); // 300응답에서 받은 Content-Type을 그대로 적용. response.setCharacterEncoding(encode); response.getWriter().print(responseData); if (logger.isDebug()){ From 35fbb771912e4ea2b3fd7a0972c7272f05b2c1f2 Mon Sep 17 00:00:00 2001 From: yunjy-hp Date: Tue, 30 Dec 2025 10:24:29 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=EC=9C=A0=EB=9F=89=EC=A0=9C=EC=96=B4=20FIX,?= =?UTF-8?q?=20=ED=91=9C=EC=A4=80=EC=A0=84=EB=AC=B8=20FIX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eactive/eai/common/inflow/InflowControlManager.java | 4 +--- .../eactive/eai/inbound/processor/RequestProcessor.java | 7 ++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/eactive/eai/common/inflow/InflowControlManager.java b/src/main/java/com/eactive/eai/common/inflow/InflowControlManager.java index 9c527fd..f200d3e 100644 --- a/src/main/java/com/eactive/eai/common/inflow/InflowControlManager.java +++ b/src/main/java/com/eactive/eai/common/inflow/InflowControlManager.java @@ -67,11 +67,9 @@ public class InflowControlManager implements Lifecycle, Bucket { */ public static Boolean isTargetOfInflowControl(EAIServerManager eaiServerManager, EAIMessage eaiMessage) { InterfaceMapper mapper = eaiMessage.getMapper(); - String inExDiv = MessageUtil.getInExDivision(mapper.getInExDivision(eaiMessage.getStandardMessage()), - eaiMessage.getInternalExternalDvcd()); // 1|2 String returnType = mapper.getSendRecvDivision(eaiMessage.getStandardMessage()); // S|R - if (STDMessageKeys.DIRECTION_IN.equals(inExDiv) && STDMessageKeys.SEND_RECV_CD_SEND.equals(returnType)) { + if (STDMessageKeys.SEND_RECV_CD_SEND.equals(returnType)) { return Boolean.valueOf(true); } diff --git a/src/main/java/com/eactive/eai/inbound/processor/RequestProcessor.java b/src/main/java/com/eactive/eai/inbound/processor/RequestProcessor.java index 7175d74..cff816c 100644 --- a/src/main/java/com/eactive/eai/inbound/processor/RequestProcessor.java +++ b/src/main/java/com/eactive/eai/inbound/processor/RequestProcessor.java @@ -1036,6 +1036,7 @@ public class RequestProcessor extends RequestProcessorSupport { } } + String inflowErrorMsg; if (blockedType.length() > 0) { InflowTargetVO inflowTargetVO = null; InflowGroupVO inflowGroupVO = null; @@ -1046,7 +1047,6 @@ public class RequestProcessor extends RequestProcessorSupport { } else { inflowTargetVO = bucket.getInterfaceInflowThreashold(vo.getEaiSvcCd()); } - String inflowErrorMsg; // 에러처리 vo.setRspErrorCode(EAIMessageKeys.EAI_INFLOW_BLOCKED_CODE); if (inflowGroupVO != null) { @@ -1161,7 +1161,8 @@ public class RequestProcessor extends RequestProcessorSupport { if (logger.isError()) logger.error(guidLogPrefix + " : 유량제어 비동기 에러응답송신 실패 - " + ee.toString()); } - return null; + throw new HttpStatusException(eaiMsg.getRspErrMsg(), eaiMsg.getRspErrCd(), + HttpStatus.TOO_MANY_REQUESTS.value()); } } } @@ -1273,7 +1274,7 @@ public class RequestProcessor extends RequestProcessorSupport { } //응답 전 표준 전문의 로직 처리 필요 한 경우를 위해 호출 - standardManager.getMessageCoordinator().coordinateBeforeResponse(standardMessage, vo, prop, inboundCharset); + standardManager.getMessageCoordinator().coordinateBeforeResponse(retEaiMsg.getStandardMessage(), vo, prop, inboundCharset); // 10. 응답 거래로그 Logging if(EAIMessageKeys.SYNC_SVC.equals(svcTsmtUsgTp) && From 0e2bdf5d9d6be7f40bc270f6ef1b457fac64263a Mon Sep 17 00:00:00 2001 From: "Yunsam.Eo" Date: Tue, 30 Dec 2025 11:05:36 +0900 Subject: [PATCH 4/4] =?UTF-8?q?pathVariable=20=EC=B2=98=EB=A6=AC=EB=A5=BC?= =?UTF-8?q?=20=EC=9C=84=ED=95=9C=20=20Action=20Calss=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=EC=84=A4=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/eactive/eai/message/StandardMessageUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eactive/eai/message/StandardMessageUtil.java b/src/main/java/com/eactive/eai/message/StandardMessageUtil.java index ccb92b6..ea503a3 100644 --- a/src/main/java/com/eactive/eai/message/StandardMessageUtil.java +++ b/src/main/java/com/eactive/eai/message/StandardMessageUtil.java @@ -22,6 +22,7 @@ public class StandardMessageUtil { public static String requestProcessorClass = "com.eactive.eai.inbound.processor.RequestProcessor"; + public static String REST_URL_ACTION0 = "com.eactive.eai.inbound.action.RestAdapterMethodUrlRequestAction"; public static String REST_URL_ACTION1 = "com.eactive.eai.inbound.action.RestUrlAdapterGroupParseRequestAction"; public static String REST_URL_ACTION2 = "com.eactive.eai.inbound.action.RestUrlParseRequestAction"; @@ -49,7 +50,7 @@ public class StandardMessageUtil { if (standardMessage == null) { // API 서비스일경우 PathVariable 지원 추가 // ex) /api/account/{no} - if (StringUtils.equalsAny(vo.getActionName(), REST_URL_ACTION1, REST_URL_ACTION2)) { + if (StringUtils.equalsAny(vo.getActionName(), REST_URL_ACTION0, REST_URL_ACTION1, REST_URL_ACTION2)) { standardMessage = stdMessageManager.getSTDMessageForPathVariable(vo.getSelectedKey()); } @@ -79,7 +80,7 @@ public class StandardMessageUtil { } } - if (StringUtils.equalsAny(actionName, REST_URL_ACTION1, REST_URL_ACTION2)) { + if (StringUtils.equalsAny(actionName, REST_URL_ACTION0, REST_URL_ACTION1, REST_URL_ACTION2)) { return stdMessageManager.getMatchedPathVariable(key); }