From d41c2cc89042169eb847f7e34f61f1d07787535e Mon Sep 17 00:00:00 2001 From: Rinjae Date: Mon, 2 Feb 2026 16:48:47 +0900 Subject: [PATCH 01/17] =?UTF-8?q?weblogic.xml=20=EB=B3=80=EA=B2=BD(?= =?UTF-8?q?=EC=84=B8=EC=85=98=20=ED=81=B4=EB=9F=AC=EC=8A=A4=ED=84=B0=20?= =?UTF-8?q?=ED=99=9C=EC=84=B1=ED=99=94)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/weblogic.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebContent/WEB-INF/weblogic.xml b/WebContent/WEB-INF/weblogic.xml index ec07529..0c158c5 100644 --- a/WebContent/WEB-INF/weblogic.xml +++ b/WebContent/WEB-INF/weblogic.xml @@ -8,8 +8,8 @@ 3600 JSESSIONID_EMS - memory - replicated_if_clustered + + replicated_if_clustered From 48531085bdf96f09876d2d93328d643b2bceb813 Mon Sep 17 00:00:00 2001 From: Rinjae Date: Mon, 2 Feb 2026 17:01:28 +0900 Subject: [PATCH 02/17] =?UTF-8?q?Revert=20"=EC=84=B8=EC=85=98=20timeout=20?= =?UTF-8?q?1=EC=8B=9C=EA=B0=84=EC=9C=BC=EB=A1=9C=20=EC=84=A4=EC=A0=95"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7fef4dcb5869cd8260a57771f84f15cc10e4088b. --- WebContent/WEB-INF/weblogic.xml | 2 +- .../rms/common/advice/EmptyJsonResponseAdviceController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WebContent/WEB-INF/weblogic.xml b/WebContent/WEB-INF/weblogic.xml index 0c158c5..7905f48 100644 --- a/WebContent/WEB-INF/weblogic.xml +++ b/WebContent/WEB-INF/weblogic.xml @@ -6,7 +6,7 @@ monitoring - 3600 + 1800 JSESSIONID_EMS replicated_if_clustered diff --git a/src/main/java/com/eactive/eai/rms/common/advice/EmptyJsonResponseAdviceController.java b/src/main/java/com/eactive/eai/rms/common/advice/EmptyJsonResponseAdviceController.java index c98bed7..78a9248 100644 --- a/src/main/java/com/eactive/eai/rms/common/advice/EmptyJsonResponseAdviceController.java +++ b/src/main/java/com/eactive/eai/rms/common/advice/EmptyJsonResponseAdviceController.java @@ -30,7 +30,7 @@ public class EmptyJsonResponseAdviceController implements ResponseBodyAdvice Date: Mon, 2 Feb 2026 17:03:34 +0900 Subject: [PATCH 03/17] =?UTF-8?q?=EC=9E=AC=20=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rms/common/advice/EmptyJsonResponseAdviceController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/eactive/eai/rms/common/advice/EmptyJsonResponseAdviceController.java b/src/main/java/com/eactive/eai/rms/common/advice/EmptyJsonResponseAdviceController.java index 78a9248..c98bed7 100644 --- a/src/main/java/com/eactive/eai/rms/common/advice/EmptyJsonResponseAdviceController.java +++ b/src/main/java/com/eactive/eai/rms/common/advice/EmptyJsonResponseAdviceController.java @@ -30,7 +30,7 @@ public class EmptyJsonResponseAdviceController implements ResponseBodyAdvice Date: Tue, 3 Feb 2026 11:21:48 +0900 Subject: [PATCH 04/17] =?UTF-8?q?=ED=95=9C=EA=B8=80=20=EC=9D=B8=EC=BD=94?= =?UTF-8?q?=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onl/manage/rule/layoutsync/LayoutSyncController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java index 0fb52f6..987dcb7 100644 --- a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java +++ b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java @@ -438,19 +438,19 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements resultSet = sis.readLine(arg, total, 1024); } - param.put("recvData", new String(arg, "UTF-8")); + param.put("recvData", new String(arg)); } catch(Exception e) { logger.error("MessageSync.err - don't read the XML File - " + new String(arg), e); param.put("recvData", ""); } // byte[]로부터 XML 파싱 (BOM 제거) - String xmlContent = new String(arg, "UTF-8").trim(); + String xmlContent = new String(arg).trim(); // BOM 제거 (UTF-8 BOM: EF BB BF) if (xmlContent.startsWith("\uFEFF")) { xmlContent = xmlContent.substring(1); } - Document doc = builder.build(new ByteArrayInputStream(xmlContent.getBytes("UTF-8"))); + Document doc = builder.build(new ByteArrayInputStream(xmlContent.getBytes())); param.put("logPrcssSeqno", UUIDGenerator.getUUID()); // xml 1.1 From 6558d21bb06933f4a97bc5acb2d34ee34d631ca8 Mon Sep 17 00:00:00 2001 From: daekuk1 Date: Tue, 3 Feb 2026 16:17:45 +0900 Subject: [PATCH 05/17] =?UTF-8?q?=ED=95=9C=EA=B8=80=20=EC=9D=B8=EC=BD=94?= =?UTF-8?q?=EB=94=A9=20=EC=98=A4=EB=A5=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rule/layoutsync/LayoutSyncController.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java index 987dcb7..fa7df09 100644 --- a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java +++ b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java @@ -438,6 +438,23 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements resultSet = sis.readLine(arg, total, 1024); } + // ===== 인코딩 확인 로그 시작 ===== + logger.info("========== 인코딩 디버깅 정보 =========="); + logger.info("request.getCharacterEncoding(): " + request.getCharacterEncoding()); + logger.info("request.getContentType(): " + request.getContentType()); + logger.info("Content Length: " + arg.length + " bytes"); + + // 다양한 인코딩으로 읽어보기 + String asDefaultEncoding = new String(arg); + String asUtf8 = new String(arg, "UTF-8"); + String asEucKr = new String(arg, "EUC-KR"); + + logger.info("Default Encoding 전체 내용:\n" + asDefaultEncoding); + logger.info("UTF-8 전체 내용:\n" + asUtf8); + logger.info("EUC-KR 전체 내용:\n" + asEucKr); + logger.info("========================================"); + // ===== 인코딩 확인 로그 끝 ===== + param.put("recvData", new String(arg)); } catch(Exception e) { logger.error("MessageSync.err - don't read the XML File - " + new String(arg), e); From 2fdf8bedd4994154854dc1f995fdc06eb14776c8 Mon Sep 17 00:00:00 2001 From: daekuk1 Date: Tue, 3 Feb 2026 16:45:28 +0900 Subject: [PATCH 06/17] =?UTF-8?q?=ED=95=9C=EA=B8=80=20=EC=9D=B8=EC=BD=94?= =?UTF-8?q?=EB=94=A9=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rule/layoutsync/LayoutSyncController.java | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java index fa7df09..dfbf837 100644 --- a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java +++ b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java @@ -455,19 +455,19 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements logger.info("========================================"); // ===== 인코딩 확인 로그 끝 ===== - param.put("recvData", new String(arg)); + param.put("recvData", new String(arg, "EUC-KR")); } catch(Exception e) { - logger.error("MessageSync.err - don't read the XML File - " + new String(arg), e); + logger.error("MessageSync.err - don't read the XML File - " + new String(arg, "EUC-KR"), e); param.put("recvData", ""); } - // byte[]로부터 XML 파싱 (BOM 제거) - String xmlContent = new String(arg).trim(); + // byte[]로부터 XML 파싱 (BOM 제거) - EUC-KR로 읽기 + String xmlContent = new String(arg, "EUC-KR").trim(); // BOM 제거 (UTF-8 BOM: EF BB BF) if (xmlContent.startsWith("\uFEFF")) { xmlContent = xmlContent.substring(1); } - Document doc = builder.build(new ByteArrayInputStream(xmlContent.getBytes())); + Document doc = builder.build(new ByteArrayInputStream(xmlContent.getBytes("EUC-KR"))); param.put("logPrcssSeqno", UUIDGenerator.getUUID()); // xml 1.1 @@ -624,10 +624,11 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements ServletOutputStream sos = null; try { + response.setContentType("application/xml; charset=EUC-KR"); sos = response.getOutputStream(); - sos.write(resultS.getBytes()); + sos.write(resultS.getBytes("EUC-KR")); } catch( Exception e ) { - e.printStackTrace(); + e.printStackTrace(); } finally { if( sis != null ) sis.close(); if( sos != null ) sos.close(); @@ -661,16 +662,16 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements // 초기화 DataSourceContextHolder.setDataSourceType(DataSourceTypeManager.getDataSourceType(schema)); - try { + try { // // 요청 전문 - sis = request.getInputStream(); - - JSONObject json = (JSONObject) JSONValue.parse(new InputStreamReader(sis)); + sis = request.getInputStream(); + + JSONObject json = (JSONObject) JSONValue.parse(new InputStreamReader(sis, "EUC-KR")); // JJB 향후제거 shkim 2020-05-13 연계 테스트 체크 logger.error("\n\n MMI SYNC Request : " + json.toString()); - // log 기록 + // log 기록 byte[] arg = new byte[request.getContentLength()]; int resultSet =0; int total = 0; @@ -680,10 +681,10 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements total += resultSet; resultSet = sis.readLine(arg, total, 1024); } - - param.put("recvData", new String(arg)); + + param.put("recvData", new String(arg, "EUC-KR")); } catch(Exception e) { - logger.error("MessageSync.err - don't read the JSON File - " + new String(arg), e); + logger.error("MessageSync.err - don't read the JSON File - " + new String(arg, "EUC-KR"), e); param.put("recvData", ""); } @@ -724,10 +725,11 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements ServletOutputStream sos = null; try { + response.setContentType("application/json; charset=EUC-KR"); sos = response.getOutputStream(); - sos.write(resultS.toString().getBytes()); + sos.write(resultS.toString().getBytes("EUC-KR")); } catch( Exception e ) { - e.printStackTrace(); + e.printStackTrace(); } finally { if( sis != null ) sis.close(); if( sos != null ) sos.close(); From 837904d4e5e11bbc3aaec3c1c8b30dd1018be1fd Mon Sep 17 00:00:00 2001 From: daekuk1 Date: Tue, 3 Feb 2026 17:03:28 +0900 Subject: [PATCH 07/17] =?UTF-8?q?quartz=20job=20spring=20bean=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job/DailyToMonthlyAggregationJob.java | 21 ++++++++++++------- .../job/HourlyToDailyAggregationJob.java | 20 +++++++++++------- .../job/MonthlyToYearlyAggregationJob.java | 21 ++++++++++++------- 3 files changed, 41 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/eactive/ext/kjb/statistics/job/DailyToMonthlyAggregationJob.java b/src/main/java/com/eactive/ext/kjb/statistics/job/DailyToMonthlyAggregationJob.java index 149b554..cb25000 100644 --- a/src/main/java/com/eactive/ext/kjb/statistics/job/DailyToMonthlyAggregationJob.java +++ b/src/main/java/com/eactive/ext/kjb/statistics/job/DailyToMonthlyAggregationJob.java @@ -10,9 +10,11 @@ import java.util.List; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; +import org.quartz.SchedulerException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -39,7 +41,6 @@ public class DailyToMonthlyAggregationJob implements Job { private ApiStatsDayService apiStatsDayService; private ApiStatsMonthService apiStatsMonthService; - private DailyToMonthlyAggregationJob self; @Autowired public void setApiStatsDayService(ApiStatsDayService apiStatsDayService) { @@ -51,18 +52,24 @@ public class DailyToMonthlyAggregationJob implements Job { this.apiStatsMonthService = apiStatsMonthService; } - @Autowired - public void setSelf(DailyToMonthlyAggregationJob self) { - this.self = self; - } - @Override public void execute(JobExecutionContext context) throws JobExecutionException { + + ApplicationContext appContext = null; + final DailyToMonthlyAggregationJob selfJob; + try { + appContext = (ApplicationContext) context.getScheduler().getContext().get("applicationContext"); + selfJob = appContext.getBean(DailyToMonthlyAggregationJob.class); + } catch (SchedulerException e) { + log.error("applicationContext get module error",e); + return ; + } + DataSourceType dataType = DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.APIGW); DataSourceContextHolder.setDataSourceType(dataType); try { YearMonth targetMonth = YearMonth.now().minusMonths(1); - self.executeManual(targetMonth); + selfJob.executeManual(targetMonth); } catch (Exception e) { throw new JobExecutionException(e); } finally { diff --git a/src/main/java/com/eactive/ext/kjb/statistics/job/HourlyToDailyAggregationJob.java b/src/main/java/com/eactive/ext/kjb/statistics/job/HourlyToDailyAggregationJob.java index feb20ee..a71b783 100644 --- a/src/main/java/com/eactive/ext/kjb/statistics/job/HourlyToDailyAggregationJob.java +++ b/src/main/java/com/eactive/ext/kjb/statistics/job/HourlyToDailyAggregationJob.java @@ -9,9 +9,11 @@ import java.util.List; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; +import org.quartz.SchedulerException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -38,7 +40,6 @@ public class HourlyToDailyAggregationJob implements Job { private ApiStatsHourService apiStatsHourService; private ApiStatsDayService apiStatsDayService; - private HourlyToDailyAggregationJob self; @Autowired public void setApiStatsHourService(ApiStatsHourService apiStatsHourService) { @@ -50,18 +51,23 @@ public class HourlyToDailyAggregationJob implements Job { this.apiStatsDayService = apiStatsDayService; } - @Autowired - public void setSelf(HourlyToDailyAggregationJob self) { - this.self = self; - } - @Override public void execute(JobExecutionContext context) throws JobExecutionException { + ApplicationContext appContext = null; + final HourlyToDailyAggregationJob selfJob; + try { + appContext = (ApplicationContext) context.getScheduler().getContext().get("applicationContext"); + selfJob = appContext.getBean(HourlyToDailyAggregationJob.class); + } catch (SchedulerException e) { + log.error("applicationContext get module error",e); + return ; + } + DataSourceType dataType = DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.APIGW); DataSourceContextHolder.setDataSourceType(dataType); try { LocalDate targetDate = LocalDate.now().minusDays(1); - self.executeManual(targetDate); + selfJob.executeManual(targetDate); } catch (Exception e) { throw new JobExecutionException(e); } finally { diff --git a/src/main/java/com/eactive/ext/kjb/statistics/job/MonthlyToYearlyAggregationJob.java b/src/main/java/com/eactive/ext/kjb/statistics/job/MonthlyToYearlyAggregationJob.java index b0450ee..c3fe895 100644 --- a/src/main/java/com/eactive/ext/kjb/statistics/job/MonthlyToYearlyAggregationJob.java +++ b/src/main/java/com/eactive/ext/kjb/statistics/job/MonthlyToYearlyAggregationJob.java @@ -8,9 +8,11 @@ import java.util.List; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; +import org.quartz.SchedulerException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -37,7 +39,6 @@ public class MonthlyToYearlyAggregationJob implements Job { private ApiStatsMonthService apiStatsMonthService; private ApiStatsYearService apiStatsYearService; - private MonthlyToYearlyAggregationJob self; @Autowired public void setApiStatsMonthService(ApiStatsMonthService apiStatsMonthService) { @@ -49,18 +50,24 @@ public class MonthlyToYearlyAggregationJob implements Job { this.apiStatsYearService = apiStatsYearService; } - @Autowired - public void setSelf(MonthlyToYearlyAggregationJob self) { - this.self = self; - } - @Override public void execute(JobExecutionContext context) throws JobExecutionException { + + ApplicationContext appContext = null; + final MonthlyToYearlyAggregationJob selfJob; + try { + appContext = (ApplicationContext) context.getScheduler().getContext().get("applicationContext"); + selfJob = appContext.getBean(MonthlyToYearlyAggregationJob.class); + } catch (SchedulerException e) { + log.error("applicationContext get module error",e); + return ; + } + DataSourceType dataType = DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.APIGW); DataSourceContextHolder.setDataSourceType(dataType); try { Year targetYear = Year.now().minusYears(1); - self.executeManual(targetYear); + selfJob.executeManual(targetYear); } catch (Exception e) { throw new JobExecutionException(e); } finally { From 98b236f9f51c590f331caf7252663cf512a2309a Mon Sep 17 00:00:00 2001 From: daekuk1 Date: Tue, 3 Feb 2026 17:55:01 +0900 Subject: [PATCH 08/17] =?UTF-8?q?MCI=20=EC=84=B1=EA=B3=B5=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/rule/layoutsync/LayoutSyncController.java | 10 ++++++++-- .../manage/rule/layoutsync/UseSystemException.java | 11 +++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/UseSystemException.java diff --git a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java index dfbf837..15604d6 100644 --- a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java +++ b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java @@ -529,7 +529,7 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements if (!"EAI".equalsIgnoreCase(useSystem) && !"FEP".equalsIgnoreCase(useSystem)) { String errorMessage = "사용 시스템(" + useSystem + ")인 전문레이아웃은 EAI, FEP로 배포 안됨."; logger.error(errorMessage); - throw new Exception(errorMessage); + throw new UseSystemException(errorMessage); } if( "ASCII".equals(format.getAttributeValue("msgType")) ) { @@ -604,9 +604,15 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements logger.error("",e.getStackTrace()[0]); try { if( results != null ) { - results.getChild("Result").setText("False"); + if (e instanceof UseSystemException) { + results.getChild("Result").setText("True"); + } else { + results.getChild("Result").setText("False"); + } results.getChild("ResultMessage").setText( e.getMessage() ); + + resultS = StringUtils.toXMLString(rDoc, true); } if( param.get("logPrcssSeqno") == null ) { diff --git a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/UseSystemException.java b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/UseSystemException.java new file mode 100644 index 0000000..6053d35 --- /dev/null +++ b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/UseSystemException.java @@ -0,0 +1,11 @@ +package com.eactive.eai.rms.onl.manage.rule.layoutsync; + +import com.eactive.eai.rms.onl.common.exception.EMSRuntimeException; + +public class UseSystemException extends EMSRuntimeException { + + public UseSystemException(String message) { + super(message); + } + +} From 6ff784d7d60477e9e401aadf23462c79820261a2 Mon Sep 17 00:00:00 2001 From: Rinjae Date: Wed, 4 Feb 2026 10:37:47 +0900 Subject: [PATCH 09/17] =?UTF-8?q?AS-IS=20=EA=B0=9C=EB=B0=9C=EC=9E=90?= =?UTF-8?q?=ED=8F=AC=ED=83=88=EC=97=90=EC=84=9C=20=EC=93=B0=EC=9D=B4?= =?UTF-8?q?=EB=8D=98=20ID=20=ED=95=84=EB=93=9C=20=EA=B0=92=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C(OBP=20=EB=94=94=EB=B9=84=20=ED=95=84=EB=93=9C=20?= =?UTF-8?q?=ED=98=95=EC=8B=9D=EA=B3=BC=20=EB=A7=9E=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EC=9D=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eactive/eai/rms/onl/apim/obp/ObpGwMetricAfterDTO.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricAfterDTO.java b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricAfterDTO.java index af7feb1..6ea4219 100644 --- a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricAfterDTO.java +++ b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricAfterDTO.java @@ -117,6 +117,12 @@ public class ObpGwMetricAfterDTO { dto.setTimeslice(formatTimeslice(entity.getTimeslice())); dto.setAttemptedCount(entity.getAttemptedCount()); dto.setCompletedCount(entity.getCompletedCount()); + + + // 260224 - AS-IS 개발자포탈에서 쓰이던 ID 필드 값 삭제(OBP 디비 필드 형식과 맞지 않음) + dto.setOrgId(null); + dto.setAppId(null); + return dto; } From ffb6dcac66897659181232e6f473789cc1e0918c Mon Sep 17 00:00:00 2001 From: Rinjae Date: Wed, 4 Feb 2026 13:52:04 +0900 Subject: [PATCH 10/17] =?UTF-8?q?OBP=20GwMetric=20=EB=82=A0=EC=A7=9C?= =?UTF-8?q?=EC=8B=9C=EA=B0=84=EB=8C=80=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rms/onl/apim/obp/ObpGwMetricAfterDTO.java | 137 ------------------ .../onl/apim/obp/ObpGwMetricController.java | 88 +---------- .../eai/rms/onl/apim/obp/ObpGwMetricDTO.java | 131 +++++++++++------ .../onl/apim/obp/ObpGwMetricManService.java | 17 +-- 4 files changed, 86 insertions(+), 287 deletions(-) delete mode 100644 src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricAfterDTO.java diff --git a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricAfterDTO.java b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricAfterDTO.java deleted file mode 100644 index 6ea4219..0000000 --- a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricAfterDTO.java +++ /dev/null @@ -1,137 +0,0 @@ -package com.eactive.eai.rms.onl.apim.obp; - -import com.eactive.apim.portal.obp.entity.ObpGwMetric; -import com.google.gson.annotations.SerializedName; -import lombok.Data; - -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; - -/** - * ObpGwMetric JSON 응답 DTO (after-timeslice 엔드포인트용) - * - *

예시 출력 형식에 맞춤:

- *
- * {
- *   "apiId": "1ba56b82-a9c9-41e2-b3ab-ff9377667d56",
- *   "apiName": "[해외송금] 가상계좌 입금실패 정보조회",
- *   "apiRoutingUri": "/api/obs/remittance/remittancefail*",
- *   "httpMethod": "POST",
- *   "orgId": "ORG001",
- *   "partnerCode": "000008-01",
- *   "appId": "APP001",
- *   "appKey": "l7xx2fd7efc523794be5a1b126873a5de613",
- *   "requestUri": "-1",
- *   "timeslice": "2025-12-02T03:00:00.000+0000",
- *   "attemptedCount": 3,
- *   "completedCount": 3
- * }
- * 
- */ -@Data -public class ObpGwMetricAfterDTO { - - private static final DateTimeFormatter ISO8601_MILLIS_FORMATTER = - DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'"); - - @SerializedName("apiId") - private String apiId; - - @SerializedName("apiName") - private String apiName; - - @SerializedName("apiRoutingUri") - private String apiRoutingUri; - - @SerializedName("httpMethod") - private String httpMethod; - - @SerializedName("orgId") - private String orgId; - - @SerializedName("partnerCode") - private String partnerCode; - - @SerializedName("appId") - private String appId; - - @SerializedName("appKey") - private String appKey; - - @SerializedName("requestUri") - private String requestUri; - - @SerializedName("timeslice") - private String timeslice; - - @SerializedName("attemptedCount") - private Long attemptedCount; - - @SerializedName("completedCount") - private Long completedCount; - - - // AS-IS 호환을 위한 필드 (null 값으로 리턴) - @SerializedName("clusterHostname") - private String clusterHostname = null; - - @SerializedName("apiDatabaseId") - private Integer apiDatabaseId = null; - - @SerializedName("unauthorizedCount") - private Integer authorizedCount = null; - - @SerializedName("backMinTime") - private Integer backMinTime = null; - - @SerializedName("backMaxTime") - private Integer backMaxTime = null; - - @SerializedName("backSumTime") - private Integer backSumTime = null; - - @SerializedName("frontMinTime") - private Integer frontMinTime = null; - - @SerializedName("frontMaxTime") - private Integer frontMaxTime = null; - - @SerializedName("frontSumTime") - private Integer frontSumTime = null; - - - /** - * Entity → DTO 변환 - */ - public static ObpGwMetricAfterDTO from(ObpGwMetric entity) { - ObpGwMetricAfterDTO dto = new ObpGwMetricAfterDTO(); - dto.setApiId(entity.getApiId()); - dto.setApiName(entity.getApiName()); - dto.setApiRoutingUri(entity.getUri()); - dto.setHttpMethod(entity.getMethod()); - dto.setOrgId(entity.getOrgId()); - dto.setPartnerCode(entity.getPartnerCode()); - dto.setAppId(entity.getAppId()); - dto.setAppKey(entity.getClientId()); - dto.setRequestUri(entity.getRequestUri()); - dto.setTimeslice(formatTimeslice(entity.getTimeslice())); - dto.setAttemptedCount(entity.getAttemptedCount()); - dto.setCompletedCount(entity.getCompletedCount()); - - - // 260224 - AS-IS 개발자포탈에서 쓰이던 ID 필드 값 삭제(OBP 디비 필드 형식과 맞지 않음) - dto.setOrgId(null); - dto.setAppId(null); - - return dto; - } - - /** - * timeslice를 ISO8601 형식 (밀리초 포함) + UTC 시간대로 변환 - * 예: 2025-12-02T03:00:00.000+0000 - */ - private static String formatTimeslice(LocalDateTime timeslice) { - if (timeslice == null) return null; - return timeslice.format(ISO8601_MILLIS_FORMATTER); - } -} diff --git a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java index 1e2dbdc..7acd524 100644 --- a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java +++ b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java @@ -85,7 +85,7 @@ public class ObpGwMetricController extends BaseRestController { DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.MONITORING)); // 5. 데이터 조회 - List metrics = obpGwMetricManService.findByTimesliceAfter(timesliceHour); + List metrics = obpGwMetricManService.findByTimesliceAfter(timesliceHour); // 6. JSON 변환 String json = toJson(metrics, pretty); @@ -104,90 +104,4 @@ public class ObpGwMetricController extends BaseRestController { throw new BizException("Failed to retrieve metrics: " + e.getMessage(), e); } } - - /** - * 특정 시간대의 GwMetric 데이터 조회 - * - * @param datetime 조회 시간대 (형식: yyyy-MM-dd_HH:mm:ss) - * @param pretty true면 JSON 들여쓰기 적용 - * @return JSON Array - */ - @RequestMapping( - value = "/kjb/gw-metrics/{datetime}.json", - produces = JSON_CONTENT_TYPE - ) - @ResponseBody - public String getGwMetrics( - @PathVariable("datetime") String datetime, - @RequestParam(value = "pretty", required = false) Boolean pretty) { - log.debug("GwMetric 조회 요청: datetime={}, pretty={}", datetime, pretty); - long startTime = System.currentTimeMillis(); - - try { - // Path 파라미터 파싱 - LocalDateTime targetTime = LocalDateTime.parse(datetime, PATH_FORMATTER); - LocalDateTime timeslice = targetTime.withMinute(0).withSecond(0).withNano(0); - - // 조회 - List metrics = obpGwMetricManService.findByTimeslice(timeslice); - - // JSON 변환 (GSON) - String json = toJson(metrics, pretty); - - long elapsed = System.currentTimeMillis() - startTime; - log.info("GwMetric 조회 완료: datetime={}, count={}, size={}, elapsed={}ms", - datetime, metrics.size(), getFormattedJsonSize(json), elapsed); - - return json; - - } catch (Exception e) { - log.error("GwMetric 조회 실패: datetime={}", datetime, e); - throw e; - } - } - - /** - * 특정 시간대 이후의 GwMetric 데이터 조회 - * - * @param datetime 조회 시작 시간대 (형식: yyyy-MM-dd_HH:mm:ss) - * @param pretty true면 JSON 들여쓰기 적용 - * @return JSON Array (해당 시간대 이후의 모든 지표) - * @deprecated Use {@link #getGwMetricsAfterTimesliceV2(String, String, Boolean)} instead. - * Migrate to /api/metrics/afterTimeslice/{timeslice}/{providerCode} - * Will be removed in next major version. - */ - @Deprecated - @RequestMapping( - value = "/kjb/gw-metrics/after-timeslice/{datetime}.json", - produces = JSON_CONTENT_TYPE - ) - @ResponseBody - public String getGwMetricsAfterTimeslice( - @PathVariable("datetime") String datetime, - @RequestParam(value = "pretty", required = false) Boolean pretty) { - log.debug("GwMetric after-timeslice 조회 요청: datetime={}, pretty={}", datetime, pretty); - long startTime = System.currentTimeMillis(); - - try { - // Path 파라미터 파싱 - LocalDateTime targetTime = LocalDateTime.parse(datetime, PATH_FORMATTER); - LocalDateTime timeslice = targetTime.withMinute(0).withSecond(0).withNano(0); - - // 조회 - List metrics = obpGwMetricManService.findByTimesliceAfter(timeslice); - - // JSON 변환 (GSON) - String json = toJson(metrics, pretty); - - long elapsed = System.currentTimeMillis() - startTime; - log.info("GwMetric after-timeslice 조회 완료: datetime={}, count={}, size={}, elapsed={}ms", - datetime, metrics.size(), getFormattedJsonSize(json), elapsed); - - return json; - - } catch (Exception e) { - log.error("GwMetric after-timeslice 조회 실패: datetime={}", datetime, e); - throw e; - } - } } diff --git a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricDTO.java b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricDTO.java index c0d0a0a..976e678 100644 --- a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricDTO.java +++ b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricDTO.java @@ -8,32 +8,61 @@ import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; /** - * ObpGwMetric JSON 응답 DTO - * Entity 주석에 명시된 JSON Key 사용 + * ObpGwMetric JSON 응답 DTO (after-timeslice 엔드포인트용) + * + *

예시 출력 형식에 맞춤:

+ *
+ * {
+ *   "apiId": "1ba56b82-a9c9-41e2-b3ab-ff9377667d56",
+ *   "apiName": "[해외송금] 가상계좌 입금실패 정보조회",
+ *   "apiRoutingUri": "/api/obs/remittance/remittancefail*",
+ *   "httpMethod": "POST",
+ *   "orgId": "ORG001",
+ *   "partnerCode": "000008-01",
+ *   "appId": "APP001",
+ *   "appKey": "l7xx2fd7efc523794be5a1b126873a5de613",
+ *   "requestUri": "-1",
+ *   "timeslice": "2025-12-02T03:00:00.000+0000",
+ *   "attemptedCount": 3,
+ *   "completedCount": 3
+ * }
+ * 
*/ @Data public class ObpGwMetricDTO { - private static final DateTimeFormatter ISO8601_FORMATTER = - DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'+0000'"); + private static final DateTimeFormatter ISO8601_MILLIS_FORMATTER = + DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'+0900'"); - @SerializedName("appKey") - private String clientId; - - @SerializedName("clusterHostname") - private String hostname; - - @SerializedName("timeslice") - private String timeslice; + @SerializedName("apiId") + private String apiId; @SerializedName("apiName") private String apiName; @SerializedName("apiRoutingUri") - private String uri; + private String apiRoutingUri; @SerializedName("httpMethod") - private String method; + private String httpMethod; + + @SerializedName("orgId") + private String orgId; + + @SerializedName("partnerCode") + private String partnerCode; + + @SerializedName("appId") + private String appId; + + @SerializedName("appKey") + private String appKey; + + @SerializedName("requestUri") + private String requestUri; + + @SerializedName("timeslice") + private String timeslice; @SerializedName("attemptedCount") private Long attemptedCount; @@ -41,62 +70,68 @@ public class ObpGwMetricDTO { @SerializedName("completedCount") private Long completedCount; - // EAPIM ID - @SerializedName("apiIdByEapim") - private String apiId; - @SerializedName("appIdByEapim") - private String appId; + // AS-IS 호환을 위한 필드 (null 값으로 리턴) + @SerializedName("clusterHostname") + private String clusterHostname = null; - @SerializedName("orgIdByEapim") - private String orgId; + @SerializedName("apiDatabaseId") + private Integer apiDatabaseId = null; - // AS-IS 호환용 필드 - @SerializedName("appId") - private String appIdByCaPortal; + @SerializedName("unauthorizedCount") + private Integer authorizedCount = null; - @SerializedName("portalOrgId") - private String orgIdByCaPortal; + @SerializedName("backMinTime") + private Integer backMinTime = null; - @SerializedName("portalApiId") - private String apiIdByCaPortal; + @SerializedName("backMaxTime") + private Integer backMaxTime = null; - @SerializedName("partnerCode") - private String partnerCode; + @SerializedName("backSumTime") + private Integer backSumTime = null; + + @SerializedName("frontMinTime") + private Integer frontMinTime = null; + + @SerializedName("frontMaxTime") + private Integer frontMaxTime = null; + + @SerializedName("frontSumTime") + private Integer frontSumTime = null; - @SerializedName("apiId") - private String apiIdByCa; /** * Entity → DTO 변환 */ public static ObpGwMetricDTO from(ObpGwMetric entity) { ObpGwMetricDTO dto = new ObpGwMetricDTO(); - dto.setClientId(entity.getClientId()); - dto.setHostname(entity.getHostname()); - dto.setTimeslice(formatTimeslice(entity.getTimeslice())); + dto.setApiId(entity.getApiId()); dto.setApiName(entity.getApiName()); - dto.setUri(entity.getUri()); - dto.setMethod(entity.getMethod()); + dto.setApiRoutingUri(entity.getUri()); + dto.setHttpMethod(entity.getMethod()); + dto.setOrgId(entity.getOrgId()); + dto.setPartnerCode(entity.getPartnerCode()); + dto.setAppId(entity.getAppId()); + dto.setAppKey(entity.getClientId()); + dto.setRequestUri(entity.getRequestUri()); + dto.setTimeslice(formatTimeslice(entity.getTimeslice())); dto.setAttemptedCount(entity.getAttemptedCount()); dto.setCompletedCount(entity.getCompletedCount()); - dto.setApiId(entity.getApiId()); - dto.setAppId(entity.getAppId()); - dto.setOrgId(entity.getOrgId()); - dto.setAppIdByCaPortal(entity.getAppIdByCaPortal()); - dto.setOrgIdByCaPortal(entity.getOrgIdByCaPortal()); - dto.setApiIdByCaPortal(entity.getApiIdByCaPortal()); - dto.setPartnerCode(entity.getPartnerCode()); - dto.setApiIdByCa(entity.getApiIdByCa()); + + + // 260224 - AS-IS 개발자포탈에서 쓰이던 ID 필드 값 삭제(OBP 디비 필드 형식과 맞지 않음) + dto.setOrgId(null); + dto.setAppId(null); + return dto; } /** - * timeslice를 ISO8601 형식 + UTC 시간대로 변환 - * 예: 2025-12-02T01:00:00+0000 + * timeslice를 ISO8601 형식 (밀리초 포함) + UTC 시간대로 변환 + * 예: 2025-12-02T03:00:00.000+0000 */ private static String formatTimeslice(LocalDateTime timeslice) { if (timeslice == null) return null; - return timeslice.format(ISO8601_FORMATTER); + return timeslice.format(ISO8601_MILLIS_FORMATTER); } } diff --git a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricManService.java b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricManService.java index 814f13c..72e5c65 100644 --- a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricManService.java +++ b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricManService.java @@ -311,30 +311,17 @@ public class ObpGwMetricManService extends BaseService { return entity; } - /** - * 특정 시간대의 GwMetric 데이터 조회 (REST API용) - */ - public List findByTimeslice(LocalDateTime timeslice) { - DataSourceContextHolder.setDataSourceType( - DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.MONITORING)); - - List entities = obpGwMetricService.findByTimeslice(timeslice); - return entities.stream() - .map(ObpGwMetricDTO::from) - .collect(Collectors.toList()); - } - /** * 특정 시간대 이후의 GwMetric 데이터 조회 (REST API용) * after-timeslice 엔드포인트에서 사용 */ - public List findByTimesliceAfter(LocalDateTime timeslice) { + public List findByTimesliceAfter(LocalDateTime timeslice) { DataSourceContextHolder.setDataSourceType( DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.MONITORING)); List entities = obpGwMetricService.findByTimesliceGreaterThanEqual(timeslice); return entities.stream() - .map(ObpGwMetricAfterDTO::from) + .map(ObpGwMetricDTO::from) .collect(Collectors.toList()); } From 1222a3b0134c37aaf06b184cce5d907a86b6eb63 Mon Sep 17 00:00:00 2001 From: Rinjae Date: Wed, 4 Feb 2026 17:49:41 +0900 Subject: [PATCH 11/17] =?UTF-8?q?OBP=20GwMetric=20=EC=A1=B0=ED=9A=8C?= =?UTF-8?q?=EB=B2=94=EC=9C=84=20=EC=A0=9C=ED=95=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onl/apim/obp/ObpGwMetricService.java | 21 +++++++++++++++++++ .../onl/apim/obp/ObpGwMetricController.java | 2 +- .../onl/apim/obp/ObpGwMetricManService.java | 18 +++++++++++++++- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eactive/eai/rms/data/entity/onl/apim/obp/ObpGwMetricService.java b/src/main/java/com/eactive/eai/rms/data/entity/onl/apim/obp/ObpGwMetricService.java index da1d6ef..4c2b803 100644 --- a/src/main/java/com/eactive/eai/rms/data/entity/onl/apim/obp/ObpGwMetricService.java +++ b/src/main/java/com/eactive/eai/rms/data/entity/onl/apim/obp/ObpGwMetricService.java @@ -2,6 +2,9 @@ package com.eactive.eai.rms.data.entity.onl.apim.obp; import com.eactive.apim.portal.obp.entity.ObpGwMetric; import com.eactive.apim.portal.obp.repository.ObpGwMetricRepository; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -50,6 +53,24 @@ public class ObpGwMetricService { return repository.findByTimesliceGreaterThanEqual(timeslice); } + /** + * 특정 시간대 이후의 GwMetric 데이터 조회 (row 수 제한) + * + * @param timeslice 조회 시작 시간대 + * @param limit 최대 조회 건수 (0이면 무제한) + * @return 조회된 지표 목록 (timeslice ASC 정렬) + */ + public List findByTimesliceGreaterThanEqual(LocalDateTime timeslice, int limit) { + if (limit <= 0) { + // 무제한 조회 (기존 동작 유지) + return repository.findByTimesliceGreaterThanEqual(timeslice); + } else { + // 제한적 조회 (timeslice ASC 정렬 + limit) + Pageable pageable = PageRequest.of(0, limit, Sort.by(Sort.Order.asc("timeslice"))); + return repository.findByTimesliceGreaterThanEqual(timeslice, pageable); + } + } + /** * 엔티티 저장 (INSERT 또는 UPDATE) */ diff --git a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java index 7acd524..5f93a4c 100644 --- a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java +++ b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java @@ -55,7 +55,7 @@ public class ObpGwMetricController extends BaseRestController { produces = JSON_CONTENT_TYPE ) @ResponseBody - public String getGwMetricsAfterTimesliceV2( + public String getGwMetricsAfterTimeslice( @PathVariable("timeslice") String timeslice, @PathVariable("providerCode") String providerCode, @RequestParam(value = "pretty", required = false) Boolean pretty) { diff --git a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricManService.java b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricManService.java index 72e5c65..a815b2c 100644 --- a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricManService.java +++ b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricManService.java @@ -10,6 +10,7 @@ import com.eactive.eai.rms.common.util.CommonUtil; import com.eactive.eai.rms.data.entity.onl.apim.obp.ObpGwMetricJpaDAO; import com.eactive.eai.rms.data.entity.onl.apim.obp.ObpGwMetricService; import com.eactive.eai.rms.data.entity.onl.apim.obp.ObpGwMetricVO; +import com.eactive.ext.kjb.common.KjbPropertyHolder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.dao.DataIntegrityViolationException; @@ -314,12 +315,27 @@ public class ObpGwMetricManService extends BaseService { /** * 특정 시간대 이후의 GwMetric 데이터 조회 (REST API용) * after-timeslice 엔드포인트에서 사용 + * + *

조회 범위 제한:

+ *
    + *
  • pageSize 값을 KjbProperty.apiGwMetricPageSize에서 읽어옴 (기본값: 10000)
  • + *
  • 0일 경우 무제한 조회
  • + *
  • 정렬: timeslice ASC (오래된 데이터부터 반환)
  • + *
*/ public List findByTimesliceAfter(LocalDateTime timeslice) { DataSourceContextHolder.setDataSourceType( DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.MONITORING)); - List entities = obpGwMetricService.findByTimesliceGreaterThanEqual(timeslice); + // KjbProperty에서 pageSize 읽기 + Integer pageSize = KjbPropertyHolder.get().getApiGwMetricPageSize(); + if (pageSize == null) { + pageSize = 10000; // 기본값 (null 안전 처리) + } + + // Service 호출 (limit 적용) + List entities = obpGwMetricService.findByTimesliceGreaterThanEqual(timeslice, pageSize); + return entities.stream() .map(ObpGwMetricDTO::from) .collect(Collectors.toList()); From 809b271ba500327f75088ffd10476038b4c3079d Mon Sep 17 00:00:00 2001 From: Rinjae Date: Wed, 4 Feb 2026 18:10:33 +0900 Subject: [PATCH 12/17] =?UTF-8?q?OBP=20GwMetric=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java index 5f93a4c..18a4f48 100644 --- a/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java +++ b/src/main/java/com/eactive/eai/rms/onl/apim/obp/ObpGwMetricController.java @@ -60,7 +60,7 @@ public class ObpGwMetricController extends BaseRestController { @PathVariable("providerCode") String providerCode, @RequestParam(value = "pretty", required = false) Boolean pretty) { - log.debug("GwMetric after-timeslice 조회 요청 (v2): timeslice={}, providerCode={}, pretty={}", + log.debug("GwMetric after-timeslice 조회 요청: timeslice={}, providerCode={}, pretty={}", timeslice, providerCode, pretty); long startTime = System.currentTimeMillis(); From 2a6de5f9ea9a1c6cbf076e4f811a6350d402c73d Mon Sep 17 00:00:00 2001 From: daekuk1 Date: Mon, 9 Feb 2026 14:22:37 +0900 Subject: [PATCH 13/17] =?UTF-8?q?=EC=97=85=EB=AC=B4=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=ED=8F=AC=ED=95=A8=20=ED=81=B4=EB=A6=BD=EB=B3=B4?= =?UTF-8?q?=EB=93=9C=20=EB=B3=B5=EC=82=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tracking/trackingManDetail.jsp | 67 ++++++++++++++++++- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/WebContent/jsp/onl/transaction/tracking/trackingManDetail.jsp b/WebContent/jsp/onl/transaction/tracking/trackingManDetail.jsp index 2f5db38..0784b56 100644 --- a/WebContent/jsp/onl/transaction/tracking/trackingManDetail.jsp +++ b/WebContent/jsp/onl/transaction/tracking/trackingManDetail.jsp @@ -203,6 +203,22 @@ layoutInfo = json.standardHeader; bzwkdatatntInfo = json.BZWKDATACTNT; + // bzwkdatatntInfoLength 파싱 및 패딩 처리 + let bzwkdatatntInfoLength = 0; + try { + bzwkdatatntInfoLength = parseInt(layoutInfo[layoutInfo.length - 2].value, 10); + if (isNaN(bzwkdatatntInfoLength)) { + bzwkdatatntInfoLength = 0; + } + } catch (e) { + bzwkdatatntInfoLength = 0; + } + + // bzwkdatatntInfo 패딩 적용 + if (bzwkdatatntInfoLength > 0 && bzwkdatatntInfo) { + bzwkdatatntInfo = padByteString(bzwkdatatntInfo, bzwkdatatntInfoLength); + } + if((isInboundPart && isInboundWithoutNet) || (isOutboundPart && isOutboundWithoutNet)){ selectHttpLog(url, prcsDate, json.EAISVCSERNO.trim(), logPrcssSerno); }else{ @@ -792,8 +808,21 @@ $(document).ready(function() { const jexcelGrid = $('#grid1').get(0).jexcel; const data = jexcelGrid.getData(); let paddedValues = ""; - for (let row of data) { - paddedValues += row[5].padEnd(row[4], " "); + + // 마지막 요소 전까지 처리 + for (let i = 0; i < data.length - 1; i++) { + paddedValues += data[i][5].padEnd(data[i][4], " "); + } + + // 마지막 요소 전에 bzwkdatatntInfo 추가 + if (bzwkdatatntInfo) { + paddedValues += bzwkdatatntInfo; + } + + // 마지막 요소 추가 + if (data.length > 0) { + const lastRow = data[data.length - 1]; + paddedValues += lastRow[5].padEnd(lastRow[4], " "); } navigator.clipboard.writeText(paddedValues);//클립보드로 복사 @@ -876,7 +905,39 @@ $(document).ready(function() { // console.log("변환 완료:", parsedList); } - + + /** + * 문자열의 바이트 수 계산 (한글 2바이트, 영문/숫자 1바이트) + */ + function getByteLength(str) { + let byteCount = 0; + for (let i = 0; i < str.length; i++) { + const charCode = str.charCodeAt(i); + byteCount += (charCode >= 0xAC00 && charCode <= 0xD7A3) ? 2 : 1; + } + return byteCount; + } + + /** + * 문자열을 주어진 바이트 수만큼 패딩 + * @param {string} str - 원본 문자열 + * @param {number} targetBytes - 목표 바이트 수 + * @param {string} position - 'left' 또는 'right' (기본: 'right') + * @param {string} padChar - 패딩 문자 (기본: 공백) + * @returns {string} - 패딩된 문자열 + */ + function padByteString(str, targetBytes, position = 'right', padChar = ' ') { + const currentBytes = getByteLength(str); + + if (currentBytes >= targetBytes) { + return str; // 이미 목표 바이트 이상이면 그대로 반환 + } + + const paddingBytes = targetBytes - currentBytes; + const padding = padChar.repeat(paddingBytes); + + return position === 'left' ? padding + str : str + padding; + } }); From 591ffa0c3568d540552ee42d1bcb228eab6dec90 Mon Sep 17 00:00:00 2001 From: daekuk1 Date: Mon, 9 Feb 2026 14:23:36 +0900 Subject: [PATCH 14/17] =?UTF-8?q?=ED=95=9C=EA=B8=80=20=EC=98=A4=EB=A5=98?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rule/layoutsync/LayoutSyncController.java | 71 ++++++++----------- 1 file changed, 30 insertions(+), 41 deletions(-) diff --git a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java index 15604d6..b8df9ea 100644 --- a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java +++ b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java @@ -404,7 +404,7 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements String resultS = null; ServletInputStream sis = null; - HashMap param = new HashMap(); + HashMap param = new HashMap<>(); String recvTime = DateUtil.getDateTime("yyyyMMddHHmmssSS").substring(0, 16); // 초기화 @@ -431,43 +431,33 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements byte[] arg = new byte[request.getContentLength()]; int resultSet = 0; int total = 0; - try { - resultSet = sis.readLine(arg, 0, arg.length); - while(resultSet != -1) { - total += resultSet; - resultSet = sis.readLine(arg, total, 1024); - } + + String xmlContent = null; + try { + resultSet = sis.readLine(arg, 0, arg.length); + while (resultSet != -1) { + total += resultSet; + resultSet = sis.readLine(arg, total, 1024); + } - // ===== 인코딩 확인 로그 시작 ===== - logger.info("========== 인코딩 디버깅 정보 =========="); - logger.info("request.getCharacterEncoding(): " + request.getCharacterEncoding()); - logger.info("request.getContentType(): " + request.getContentType()); - logger.info("Content Length: " + arg.length + " bytes"); + xmlContent = new String(arg, "EUC-KR"); + // ===== 인코딩 확인 로그 시작 ===== + logger.info("========== 인코딩 디버깅 정보 =========="); + // 다양한 인코딩으로 읽어보기 + logger.info("request.getCharacterEncoding(): {}", request.getCharacterEncoding()); + logger.info("request.getContentType(): {}", request.getContentType()); + logger.info("Content Length: {} bytes", arg.length); + logger.info("EUC-KR 전체 내용:\n{}", xmlContent); + logger.info("========================================"); + // ===== 인코딩 확인 로그 끝 ===== + param.put("recvData", xmlContent); + } catch (Exception e) { + logger.error("MessageSync.err - don't read the XML File", e); + param.put("recvData", ""); + } - // 다양한 인코딩으로 읽어보기 - String asDefaultEncoding = new String(arg); - String asUtf8 = new String(arg, "UTF-8"); - String asEucKr = new String(arg, "EUC-KR"); - - logger.info("Default Encoding 전체 내용:\n" + asDefaultEncoding); - logger.info("UTF-8 전체 내용:\n" + asUtf8); - logger.info("EUC-KR 전체 내용:\n" + asEucKr); - logger.info("========================================"); - // ===== 인코딩 확인 로그 끝 ===== - - param.put("recvData", new String(arg, "EUC-KR")); - } catch(Exception e) { - logger.error("MessageSync.err - don't read the XML File - " + new String(arg, "EUC-KR"), e); - param.put("recvData", ""); - } - - // byte[]로부터 XML 파싱 (BOM 제거) - EUC-KR로 읽기 - String xmlContent = new String(arg, "EUC-KR").trim(); - // BOM 제거 (UTF-8 BOM: EF BB BF) - if (xmlContent.startsWith("\uFEFF")) { - xmlContent = xmlContent.substring(1); - } - Document doc = builder.build(new ByteArrayInputStream(xmlContent.getBytes("EUC-KR"))); + // byte[]로부터 XML 파싱 - EUC-KR로 읽기 + Document doc = builder.build(new StringReader(xmlContent)); param.put("logPrcssSeqno", UUIDGenerator.getUUID()); // xml 1.1 @@ -485,9 +475,9 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements param.put("recvAmndHMS", recvTime); logger.info(layoutName + " command - [" + command +"]"); - HashMap returnMap = new HashMap(); + HashMap returnMap = new HashMap<>(); if( command.equals("delete") ) { - HashMap vo = new HashMap(); + HashMap vo = new HashMap<>(); vo.put("loutName",layoutName); service.deleteLayout(vo); @@ -513,10 +503,10 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements // } String layout = body.getChild("data").getText(); - logger.info(layoutName + " recv Data - [" + layout + "]"); + logger.info("{} recv Data - [{}]]", layoutName, layout); param.put("recvData", layout); - Document doc2 = builder.build(new ByteArrayInputStream(layout.getBytes())); + Document doc2 = builder.build(new StringReader(layout)); HashMap vo = new HashMap(); @@ -601,7 +591,6 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements } catch( Exception e ) { logger.error("",e); - logger.error("",e.getStackTrace()[0]); try { if( results != null ) { if (e instanceof UseSystemException) { From f53fefcb2e7ca6afc0ac89907ceab1cc90bb62cd Mon Sep 17 00:00:00 2001 From: Rinjae Date: Mon, 9 Feb 2026 14:25:14 +0900 Subject: [PATCH 15/17] =?UTF-8?q?UMS=20=EC=97=B0=EB=8F=99=20=EB=B6=80?= =?UTF-8?q?=EB=B6=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../com/eactive/eai/rms/ext/kjb/smsauth/SmsAuthService.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 818a536..759e8ef 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -org.gradle.jvmargs=-Xmx2g +org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError org.gradle.parallel=true org.gradle.caching=true org.gradle.configureondemand=true \ No newline at end of file diff --git a/src/main/java/com/eactive/eai/rms/ext/kjb/smsauth/SmsAuthService.java b/src/main/java/com/eactive/eai/rms/ext/kjb/smsauth/SmsAuthService.java index 4769cc8..6a0b7c1 100644 --- a/src/main/java/com/eactive/eai/rms/ext/kjb/smsauth/SmsAuthService.java +++ b/src/main/java/com/eactive/eai/rms/ext/kjb/smsauth/SmsAuthService.java @@ -7,6 +7,7 @@ import com.eactive.ext.kjb.common.KjbPropertyHolder; import com.eactive.ext.kjb.common.KjbUmsException; import com.eactive.ext.kjb.ums.KjbUmsService; import com.eactive.ext.kjb.ums.UmsBizWorkCode; +import com.eactive.ext.kjb.ums.gson.GsonUtil; import com.eactive.ext.kjb.ums.gson.IUmsGsonObject; import com.eactive.ext.kjb.ums.gson.VerifyPhoneUmsTemplate; import lombok.extern.slf4j.Slf4j; @@ -124,7 +125,7 @@ public class SmsAuthService { IUmsGsonObject content = null; content = VerifyPhoneUmsTemplate.builder().authNumber(authCode).build(); - getUmsService().sendKakaoAlimTalk(guid, UmsBizWorkCode.VERIFY_PHONE, cleanedPhone, content); + getUmsService().sendKakaoAlimTalk(guid, UmsBizWorkCode.VERIFY_PHONE, cleanedPhone, GsonUtil.toJsonObject(content)); log.info("SMS 인증번호 발송 완료 - guid: {}, phone: {}****{}", guid, cleanedPhone.substring(0, 3), cleanedPhone.substring(cleanedPhone.length() - 4)); log.debug("SMS 인증번호 발송 - authCode: {}", authCode); From de2aea658d2f60e52a5b909403b143acb901f3aa Mon Sep 17 00:00:00 2001 From: Rinjae Date: Mon, 9 Feb 2026 14:41:50 +0900 Subject: [PATCH 16/17] =?UTF-8?q?UMS=20=EC=97=B0=EB=8F=99=20=EB=B6=80?= =?UTF-8?q?=EB=B6=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eactive/eai/rms/ext/kjb/smsauth/SmsAuthService.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/eactive/eai/rms/ext/kjb/smsauth/SmsAuthService.java b/src/main/java/com/eactive/eai/rms/ext/kjb/smsauth/SmsAuthService.java index 6a0b7c1..ea0a1fa 100644 --- a/src/main/java/com/eactive/eai/rms/ext/kjb/smsauth/SmsAuthService.java +++ b/src/main/java/com/eactive/eai/rms/ext/kjb/smsauth/SmsAuthService.java @@ -8,8 +8,8 @@ import com.eactive.ext.kjb.common.KjbUmsException; import com.eactive.ext.kjb.ums.KjbUmsService; import com.eactive.ext.kjb.ums.UmsBizWorkCode; import com.eactive.ext.kjb.ums.gson.GsonUtil; -import com.eactive.ext.kjb.ums.gson.IUmsGsonObject; import com.eactive.ext.kjb.ums.gson.VerifyPhoneUmsTemplate; +import com.google.gson.JsonObject; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -122,10 +122,9 @@ public class SmsAuthService { String guid = String.format("EAPIM_EMS-%s", DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS").format(LocalDateTime.now())); - IUmsGsonObject content = null; - content = VerifyPhoneUmsTemplate.builder().authNumber(authCode).build(); + JsonObject content = GsonUtil.toJsonObject(VerifyPhoneUmsTemplate.builder().authNumber(authCode).build()); - getUmsService().sendKakaoAlimTalk(guid, UmsBizWorkCode.VERIFY_PHONE, cleanedPhone, GsonUtil.toJsonObject(content)); + getUmsService().sendKakaoAlimTalk(guid, UmsBizWorkCode.VERIFY_PHONE, cleanedPhone, content); log.info("SMS 인증번호 발송 완료 - guid: {}, phone: {}****{}", guid, cleanedPhone.substring(0, 3), cleanedPhone.substring(cleanedPhone.length() - 4)); log.debug("SMS 인증번호 발송 - authCode: {}", authCode); From ae286cb6b7eafaf401e52e0757867d96cf707435 Mon Sep 17 00:00:00 2001 From: daekuk1 Date: Mon, 9 Feb 2026 16:45:46 +0900 Subject: [PATCH 17/17] =?UTF-8?q?function=20=EC=9C=84=EC=B9=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tracking/trackingManDetail.jsp | 65 ++++++++++--------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/WebContent/jsp/onl/transaction/tracking/trackingManDetail.jsp b/WebContent/jsp/onl/transaction/tracking/trackingManDetail.jsp index 66bece0..2e2a48c 100644 --- a/WebContent/jsp/onl/transaction/tracking/trackingManDetail.jsp +++ b/WebContent/jsp/onl/transaction/tracking/trackingManDetail.jsp @@ -914,40 +914,41 @@ $(document).ready(function() { // console.log("변환 완료:", parsedList); } - /** - * 문자열의 바이트 수 계산 (한글 2바이트, 영문/숫자 1바이트) - */ - function getByteLength(str) { - let byteCount = 0; - for (let i = 0; i < str.length; i++) { - const charCode = str.charCodeAt(i); - byteCount += (charCode >= 0xAC00 && charCode <= 0xD7A3) ? 2 : 1; - } - return byteCount; - } - - /** - * 문자열을 주어진 바이트 수만큼 패딩 - * @param {string} str - 원본 문자열 - * @param {number} targetBytes - 목표 바이트 수 - * @param {string} position - 'left' 또는 'right' (기본: 'right') - * @param {string} padChar - 패딩 문자 (기본: 공백) - * @returns {string} - 패딩된 문자열 - */ - function padByteString(str, targetBytes, position = 'right', padChar = ' ') { - const currentBytes = getByteLength(str); - - if (currentBytes >= targetBytes) { - return str; // 이미 목표 바이트 이상이면 그대로 반환 - } - - const paddingBytes = targetBytes - currentBytes; - const padding = padChar.repeat(paddingBytes); - - return position === 'left' ? padding + str : str + padding; - } }); +/** + * 문자열의 바이트 수 계산 (한글 2바이트, 영문/숫자 1바이트) + */ +function getByteLength(str) { + let byteCount = 0; + for (let i = 0; i < str.length; i++) { + const charCode = str.charCodeAt(i); + byteCount += (charCode >= 0xAC00 && charCode <= 0xD7A3) ? 2 : 1; + } + return byteCount; +} + +/** + * 문자열을 주어진 바이트 수만큼 패딩 + * @param {string} str - 원본 문자열 + * @param {number} targetBytes - 목표 바이트 수 + * @param {string} position - 'left' 또는 'right' (기본: 'right') + * @param {string} padChar - 패딩 문자 (기본: 공백) + * @returns {string} - 패딩된 문자열 + */ +function padByteString(str, targetBytes, position = 'right', padChar = ' ') { + const currentBytes = getByteLength(str); + + if (currentBytes >= targetBytes) { + return str; // 이미 목표 바이트 이상이면 그대로 반환 + } + + const paddingBytes = targetBytes - currentBytes; + const padding = padChar.repeat(paddingBytes); + + return position === 'left' ? padding + str : str + padding; +} +