From 455e4983ea86406c470cadadfd586a8ae2a5015c Mon Sep 17 00:00:00 2001 From: Rinjae Date: Tue, 14 Oct 2025 18:07:25 +0900 Subject: [PATCH 1/4] =?UTF-8?q?ums=20=EC=97=B0=EB=8F=99=20=EC=9E=91?= =?UTF-8?q?=EC=84=B1=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 8 ++ .../eai/custom/kjb/ums/KjbUmsService.java | 85 +++++++++++++++++++ .../service/MonitoringPropertyService.java | 14 +++ 3 files changed, 107 insertions(+) create mode 100644 src/main/java/com/eactive/eai/custom/kjb/ums/KjbUmsService.java diff --git a/readme.md b/readme.md index c220ef5..0c70a31 100644 --- a/readme.md +++ b/readme.md @@ -64,3 +64,11 @@ gradle build -x test -Pprofile=weblogic ## 광주은행 참고 사항 ### PORTAL Parameter - deploy.prod_use_proxy = N (개발/운영 망 간 연동 없음) +- kjb.ums.eai_batch.url : EAI 배치 서버 URL (이메일 발송 용도) + - 개발 : http://172.31.32.111:10230/BATAppWeb/EaiBatCall + - QA : http://172.31.33.111:10430/BATAppWeb/EaiBatCall + - 운영 : http://172.21.1.40:10860/BATAppWeb/EaiBatCall + - 입력하지 않을 경우 EAI 배치 호출을 하지 않고 내부적으로 통신하지 않고 정상 처리(log 내 warning 로그) +- kjb.ums.eai_batch.send_dir : EAI 배치 서버 파일 송신 디렉토리 + - Default : /Data/eapim/portal/sendmail + diff --git a/src/main/java/com/eactive/eai/custom/kjb/ums/KjbUmsService.java b/src/main/java/com/eactive/eai/custom/kjb/ums/KjbUmsService.java new file mode 100644 index 0000000..6b55e19 --- /dev/null +++ b/src/main/java/com/eactive/eai/custom/kjb/ums/KjbUmsService.java @@ -0,0 +1,85 @@ +package com.eactive.eai.custom.kjb.ums; + +import com.eactive.apim.portal.template.entity.MessageRequest; +import com.eactive.eai.rms.common.base.BaseService; +import com.eactive.eai.rms.data.entity.man.monitoringProperty.service.MonitoringPropertyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.json.simple.JSONObject; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.nio.file.Path; +import java.nio.file.Paths; + +@Service +@Transactional(transactionManager = "transactionManagerForEMS") +@Slf4j +public class KjbUmsService extends BaseService { + public static final String PROP_GORUP_ID = "Monitoring"; + public static final String PROP_EAI_BATCH_URL = "kjb.ums.eai_batch.url"; + public static final String PROP_EAI_BATCH_SEND_DIR = "kjb.ums.eai_batch.send_dir"; + + private final MonitoringPropertyService monitoringPropertyService; + + private final String EAI_BATCH_URL; + private final String EAI_BATCH_SEND_DIR; + + + private KjbUmsService(MonitoringPropertyService monitoringPropertyService) { + this.monitoringPropertyService = monitoringPropertyService; + + + // 파라미터 검사 + this.EAI_BATCH_URL = monitoringPropertyService.getPropertyValue(PROP_GORUP_ID, PROP_EAI_BATCH_URL, ""); + this.EAI_BATCH_SEND_DIR = monitoringPropertyService.getPropertyValue(PROP_GORUP_ID, PROP_EAI_BATCH_SEND_DIR, "/Data/eapim/portal/sendmail"); + + + if (EAI_BATCH_URL.isEmpty()) { + log.warn("{} 가 설정되지 않음. 실제 EAI 배치 연동 없이 동작함", PROP_EAI_BATCH_URL); + } + + log.info("EAI Batch URL: {}", EAI_BATCH_URL); + log.info("EAI Batch Send Dir: {}", EAI_BATCH_SEND_DIR); + + + // 디렉토리 검사(쓰기 권한 포함) + Path sendDirPath = Paths.get(EAI_BATCH_SEND_DIR); + if (!sendDirPath.toFile().exists()) { + // 생성 시도 + boolean created = sendDirPath.toFile().mkdirs(); + if (!created) { + log.error("EAI_BATCH_SEND_DIR 디렉토리를 생성할 수 없음: {}", EAI_BATCH_SEND_DIR); + throw new IllegalStateException("EAI_BATCH_SEND_DIR 디렉토리를 생성할 수 없음: " + EAI_BATCH_SEND_DIR); + } + } + + if (!sendDirPath.toFile().isDirectory()) { + log.error("EAI_BATCH_SEND_DIR 가 디렉토리가 아님: {}", EAI_BATCH_SEND_DIR); + throw new IllegalStateException("EAI_BATCH_SEND_DIR 가 디렉토리가 아님: " + EAI_BATCH_SEND_DIR); + } + + if (!sendDirPath.toFile().canWrite()) { + log.error("EAI_BATCH_SEND_DIR 에 쓰기 권한이 없음: {}", EAI_BATCH_SEND_DIR); + throw new IllegalStateException("EAI_BATCH_SEND_DIR 에 쓰기 권한이 없음: " + EAI_BATCH_SEND_DIR); + } + } + + + public void sendEmail(MessageRequest messageRequest) { + log.debug("sendEmail() called - EAI_BATCH_URL: {}, EAI_BATCH_SEND_DIR: {}", EAI_BATCH_URL, EAI_BATCH_SEND_DIR); + log.debug("MessageRequest ID: {}, Email: {}", messageRequest.getId(), messageRequest.getEmail()); + + + if (StringUtils.isEmpty(messageRequest.getId())) { + log.warn("MessageRequest ID is empty"); + throw new IllegalArgumentException("MessageRequest ID is required"); + } + + + String filename = "EMAIL_" + messageRequest.getId() + ".json"; + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("to", messageRequest.getEmail()); + } +} diff --git a/src/main/java/com/eactive/eai/rms/data/entity/man/monitoringProperty/service/MonitoringPropertyService.java b/src/main/java/com/eactive/eai/rms/data/entity/man/monitoringProperty/service/MonitoringPropertyService.java index 75327b4..bbd3e0d 100644 --- a/src/main/java/com/eactive/eai/rms/data/entity/man/monitoringProperty/service/MonitoringPropertyService.java +++ b/src/main/java/com/eactive/eai/rms/data/entity/man/monitoringProperty/service/MonitoringPropertyService.java @@ -35,6 +35,20 @@ public class MonitoringPropertyService return property.map(MonitoringProperty::getPrpty2Val).orElse(null); } + public String getPropertyValue(String prptyGroupName, String prptyName, String defaultValue) { + MonitoringPropertyId id = new MonitoringPropertyId(); + id.setPrptyGroupName(prptyGroupName); + id.setPrptyName(prptyName); + + Optional property = repository.findById(id); + if (property.isPresent() && !property.get().getPrpty2Val().isEmpty()) { + return property.get().getPrpty2Val(); + } else { + return defaultValue; + } + + } + public Iterable findAllByIdPrptyName(String prptyName) { BooleanExpression predicate = QMonitoringProperty.monitoringProperty.id.prptyName.eq(prptyName); return repository.findAll(predicate); From 604d7975f68f33e5117808d81918fbf0ef65008d Mon Sep 17 00:00:00 2001 From: Rinjae Date: Fri, 17 Oct 2025 18:10:38 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=EC=9D=B4=EB=A9=94=EC=9D=BC=20=EC=97=B0?= =?UTF-8?q?=EB=8F=99=20=EA=B8=B0=EB=8A=A5=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spring/KjbSafedbPasswordEncoder.java | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 src/main/java/com/eactive/eai/custom/kjb/common/spring/KjbSafedbPasswordEncoder.java diff --git a/src/main/java/com/eactive/eai/custom/kjb/common/spring/KjbSafedbPasswordEncoder.java b/src/main/java/com/eactive/eai/custom/kjb/common/spring/KjbSafedbPasswordEncoder.java deleted file mode 100644 index f8d64c7..0000000 --- a/src/main/java/com/eactive/eai/custom/kjb/common/spring/KjbSafedbPasswordEncoder.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.eactive.eai.custom.kjb.common.spring; - -import com.eactive.ext.kjb.safedb.KjbSafedbWrapper; -import org.springframework.security.crypto.password.PasswordEncoder; - -public class KjbSafedbPasswordEncoder implements PasswordEncoder { - @Override - public String encode(CharSequence rawPassword) { - KjbSafedbWrapper safedb = KjbSafedbWrapper.getInstance(); - return safedb.encryptPassword(rawPassword.toString()); - } - - @Override - public boolean matches(CharSequence rawPassword, String encodedPassword) { - KjbSafedbWrapper safedb = KjbSafedbWrapper.getInstance(); - String encoded = safedb.encryptPassword(rawPassword.toString()); - return encoded.equals(encodedPassword); - } -} From 423af16926a79b2a434aec721a50b339e6f74056 Mon Sep 17 00:00:00 2001 From: Rinjae Date: Fri, 17 Oct 2025 19:28:09 +0900 Subject: [PATCH 3/4] =?UTF-8?q?ums=20=EC=97=B0=EB=8F=99=20=EB=8C=80?= =?UTF-8?q?=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 +- build.gradle | 1 + settings.gradle | 17 ++- .../kjb/spring/KjbSafedbPasswordEncoder.java | 19 +++ .../eai/custom/kjb/ums/KjbUmsService.java | 85 ------------ .../template/MessageTemplateManService.java | 1 - .../eactive/ext/kjb/ums/KjbUmsService.java | 125 ++++++++++++++++++ 7 files changed, 159 insertions(+), 94 deletions(-) create mode 100644 src/main/java/com/eactive/eai/custom/kjb/spring/KjbSafedbPasswordEncoder.java delete mode 100644 src/main/java/com/eactive/eai/custom/kjb/ums/KjbUmsService.java create mode 100644 src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java diff --git a/.gitignore b/.gitignore index 546de91..acaddd3 100644 --- a/.gitignore +++ b/.gitignore @@ -239,4 +239,7 @@ gradle-app.setting Doc/ docs build-gf63.sh -gradle-gf63.sh \ No newline at end of file +gradle-gf63.sh + + +eapim-admin-kjb/ \ No newline at end of file diff --git a/build.gradle b/build.gradle index 4a97fd3..a834935 100644 --- a/build.gradle +++ b/build.gradle @@ -77,6 +77,7 @@ dependencies { implementation project(':elink-online-emsclient') implementation project(':elink-portal-common') implementation project(':kjb-safedb') + implementation project(":eapim-admin-kjb") /* Custom Libs */ implementation fileTree(dir: 'libs', include: ['*.jar']) diff --git a/settings.gradle b/settings.gradle index c36ddb9..65b5893 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,13 +7,16 @@ include 'elink-online-common' include 'elink-online-emsclient' include 'elink-portal-common' -project (':elink-online-core-jpa').projectDir = new File(settingsDir, "../eapim-online/elink-online-core-jpa") -project (':elink-online-core').projectDir = new File(settingsDir, "../eapim-online/elink-online-core") -project (':elink-online-transformer').projectDir = new File(settingsDir, "../eapim-online/elink-online-transformer") -project (':elink-online-common').projectDir = new File(settingsDir, "../eapim-online/elink-online-common") -project (':elink-online-emsclient').projectDir = new File(settingsDir, "../eapim-online/elink-online-emsclient") -project (':elink-portal-common').projectDir = new File(settingsDir, "../elink-portal-common") +project(':elink-online-core-jpa').projectDir = new File(settingsDir, "../eapim-online/elink-online-core-jpa") +project(':elink-online-core').projectDir = new File(settingsDir, "../eapim-online/elink-online-core") +project(':elink-online-transformer').projectDir = new File(settingsDir, "../eapim-online/elink-online-transformer") +project(':elink-online-common').projectDir = new File(settingsDir, "../eapim-online/elink-online-common") +project(':elink-online-emsclient').projectDir = new File(settingsDir, "../eapim-online/elink-online-emsclient") +project(':elink-portal-common').projectDir = new File(settingsDir, "../elink-portal-common") include 'kjb-safedb' -project (':kjb-safedb').projectDir = new File(settingsDir, "../kjb-safedb") \ No newline at end of file +project(':kjb-safedb').projectDir = new File(settingsDir, "../kjb-safedb") + +include 'eapim-admin-kjb' +project(':eapim-admin-kjb').projectDir = new File(settingsDir, "eapim-admin-kjb") \ No newline at end of file diff --git a/src/main/java/com/eactive/eai/custom/kjb/spring/KjbSafedbPasswordEncoder.java b/src/main/java/com/eactive/eai/custom/kjb/spring/KjbSafedbPasswordEncoder.java new file mode 100644 index 0000000..e6ab741 --- /dev/null +++ b/src/main/java/com/eactive/eai/custom/kjb/spring/KjbSafedbPasswordEncoder.java @@ -0,0 +1,19 @@ +package com.eactive.eai.custom.kjb.spring; + +import com.eactive.ext.kjb.safedb.KjbSafedbWrapper; +import org.springframework.security.crypto.password.PasswordEncoder; + +public class KjbSafedbPasswordEncoder implements PasswordEncoder { + @Override + public String encode(CharSequence rawPassword) { + KjbSafedbWrapper safedb = KjbSafedbWrapper.getInstance(); + return safedb.encryptPassword(rawPassword.toString()); + } + + @Override + public boolean matches(CharSequence rawPassword, String encodedPassword) { + KjbSafedbWrapper safedb = KjbSafedbWrapper.getInstance(); + String encoded = safedb.encryptPassword(rawPassword.toString()); + return encoded.equals(encodedPassword); + } +} diff --git a/src/main/java/com/eactive/eai/custom/kjb/ums/KjbUmsService.java b/src/main/java/com/eactive/eai/custom/kjb/ums/KjbUmsService.java deleted file mode 100644 index 6b55e19..0000000 --- a/src/main/java/com/eactive/eai/custom/kjb/ums/KjbUmsService.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.eactive.eai.custom.kjb.ums; - -import com.eactive.apim.portal.template.entity.MessageRequest; -import com.eactive.eai.rms.common.base.BaseService; -import com.eactive.eai.rms.data.entity.man.monitoringProperty.service.MonitoringPropertyService; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.json.simple.JSONObject; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.nio.file.Path; -import java.nio.file.Paths; - -@Service -@Transactional(transactionManager = "transactionManagerForEMS") -@Slf4j -public class KjbUmsService extends BaseService { - public static final String PROP_GORUP_ID = "Monitoring"; - public static final String PROP_EAI_BATCH_URL = "kjb.ums.eai_batch.url"; - public static final String PROP_EAI_BATCH_SEND_DIR = "kjb.ums.eai_batch.send_dir"; - - private final MonitoringPropertyService monitoringPropertyService; - - private final String EAI_BATCH_URL; - private final String EAI_BATCH_SEND_DIR; - - - private KjbUmsService(MonitoringPropertyService monitoringPropertyService) { - this.monitoringPropertyService = monitoringPropertyService; - - - // 파라미터 검사 - this.EAI_BATCH_URL = monitoringPropertyService.getPropertyValue(PROP_GORUP_ID, PROP_EAI_BATCH_URL, ""); - this.EAI_BATCH_SEND_DIR = monitoringPropertyService.getPropertyValue(PROP_GORUP_ID, PROP_EAI_BATCH_SEND_DIR, "/Data/eapim/portal/sendmail"); - - - if (EAI_BATCH_URL.isEmpty()) { - log.warn("{} 가 설정되지 않음. 실제 EAI 배치 연동 없이 동작함", PROP_EAI_BATCH_URL); - } - - log.info("EAI Batch URL: {}", EAI_BATCH_URL); - log.info("EAI Batch Send Dir: {}", EAI_BATCH_SEND_DIR); - - - // 디렉토리 검사(쓰기 권한 포함) - Path sendDirPath = Paths.get(EAI_BATCH_SEND_DIR); - if (!sendDirPath.toFile().exists()) { - // 생성 시도 - boolean created = sendDirPath.toFile().mkdirs(); - if (!created) { - log.error("EAI_BATCH_SEND_DIR 디렉토리를 생성할 수 없음: {}", EAI_BATCH_SEND_DIR); - throw new IllegalStateException("EAI_BATCH_SEND_DIR 디렉토리를 생성할 수 없음: " + EAI_BATCH_SEND_DIR); - } - } - - if (!sendDirPath.toFile().isDirectory()) { - log.error("EAI_BATCH_SEND_DIR 가 디렉토리가 아님: {}", EAI_BATCH_SEND_DIR); - throw new IllegalStateException("EAI_BATCH_SEND_DIR 가 디렉토리가 아님: " + EAI_BATCH_SEND_DIR); - } - - if (!sendDirPath.toFile().canWrite()) { - log.error("EAI_BATCH_SEND_DIR 에 쓰기 권한이 없음: {}", EAI_BATCH_SEND_DIR); - throw new IllegalStateException("EAI_BATCH_SEND_DIR 에 쓰기 권한이 없음: " + EAI_BATCH_SEND_DIR); - } - } - - - public void sendEmail(MessageRequest messageRequest) { - log.debug("sendEmail() called - EAI_BATCH_URL: {}, EAI_BATCH_SEND_DIR: {}", EAI_BATCH_URL, EAI_BATCH_SEND_DIR); - log.debug("MessageRequest ID: {}, Email: {}", messageRequest.getId(), messageRequest.getEmail()); - - - if (StringUtils.isEmpty(messageRequest.getId())) { - log.warn("MessageRequest ID is empty"); - throw new IllegalArgumentException("MessageRequest ID is required"); - } - - - String filename = "EMAIL_" + messageRequest.getId() + ".json"; - - JSONObject jsonObject = new JSONObject(); - jsonObject.put("to", messageRequest.getEmail()); - } -} diff --git a/src/main/java/com/eactive/eai/rms/onl/apim/template/MessageTemplateManService.java b/src/main/java/com/eactive/eai/rms/onl/apim/template/MessageTemplateManService.java index d7fc71a..498a463 100644 --- a/src/main/java/com/eactive/eai/rms/onl/apim/template/MessageTemplateManService.java +++ b/src/main/java/com/eactive/eai/rms/onl/apim/template/MessageTemplateManService.java @@ -1,6 +1,5 @@ package com.eactive.eai.rms.onl.apim.template; -import com.eactive.apim.portal.template.entity.MessageCode; import com.eactive.apim.portal.template.entity.MessageTemplate; import com.eactive.eai.rms.common.base.BaseService; import com.eactive.eai.rms.data.entity.onl.apim.template.MessageTemplateSearch; diff --git a/src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java b/src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java new file mode 100644 index 0000000..08c3ccd --- /dev/null +++ b/src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java @@ -0,0 +1,125 @@ +package com.eactive.ext.kjb.ums; + +import com.eactive.apim.portal.template.entity.MessageRequest; +import com.eactive.eai.rms.common.base.BaseService; +import com.eactive.eai.rms.data.entity.man.monitoringProperty.service.MonitoringPropertyService; +import com.eactive.ext.kjb.common.KjbProperty; +import com.eactive.ext.kjb.safedb.KjbSafedbWrapper; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonObject; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.io.UnsupportedEncodingException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; + +@Service +@Transactional(transactionManager = "transactionManagerForEMS") +@Slf4j +public class KjbUmsService extends BaseService { + public static final String PROP_GORUP_ID = "Monitoring"; + public static final String PROP_EAI_BATCH_URL = "kjb.ums.eai_batch.url"; + public static final String PROP_EAI_BATCH_SEND_DIR = "kjb.ums.eai_batch.send_dir"; + + + private final KjbSafedbWrapper kjbSafedbWrapper; + + private final KjbProperty prop; + + + @Autowired + public KjbUmsService(KjbSafedbWrapper kjbSafedbWrapper, + MonitoringPropertyService monitoringPropertyService) { + this.kjbSafedbWrapper = kjbSafedbWrapper; + + KjbProperty prop = new KjbProperty(); + prop.setEaiBatchUrl(monitoringPropertyService.getPropertyValue(PROP_GORUP_ID, PROP_EAI_BATCH_URL, "")); + prop.setEaiBatchSendDir(monitoringPropertyService.getPropertyValue(PROP_GORUP_ID, PROP_EAI_BATCH_SEND_DIR, "/Data/files/send")); + + this.prop = prop; + } + + public KjbUmsService(KjbSafedbWrapper kjbSafedbWrapper, + KjbProperty property) { + this.kjbSafedbWrapper = kjbSafedbWrapper; + this.prop = property; + + init(); + } + + + private void init() { + if (prop.getEaiBatchUrl().isEmpty()) { + log.warn("{} 가 설정되지 않음. 실제 EAI 배치 연동 없이 동작함", PROP_EAI_BATCH_URL); + } + + log.info("EAI Batch URL: {}", prop.getEaiBatchUrl()); + log.info("EAI Batch Send Dir: {}", prop.getEaiBatchSendDir()); + + + // 디렉토리 검사(쓰기 권한 포함) + Path sendDirPath = Paths.get(prop.getEaiBatchSendDir()); + if (!sendDirPath.toFile().exists()) { + // 생성 시도 + boolean created = sendDirPath.toFile().mkdirs(); + if (!created) { + log.error("EAI_BATCH_SEND_DIR 디렉토리를 생성할 수 없음: {}", prop.getEaiBatchSendDir()); + throw new IllegalStateException("EAI_BATCH_SEND_DIR 디렉토리를 생성할 수 없음: " + prop.getEaiBatchSendDir()); + } + } + + if (!sendDirPath.toFile().isDirectory()) { + log.error("EAI_BATCH_SEND_DIR 가 디렉토리가 아님: {}", prop.getEaiBatchSendDir()); + throw new IllegalStateException("EAI_BATCH_SEND_DIR 가 디렉토리가 아님: " + prop.getEaiBatchSendDir()); + } + + if (!sendDirPath.toFile().canWrite()) { + log.error("EAI_BATCH_SEND_DIR 에 쓰기 권한이 없음: {}", prop.getEaiBatchSendDir()); + throw new IllegalStateException("EAI_BATCH_SEND_DIR 에 쓰기 권한이 없음: " + prop.getEaiBatchSendDir()); + } + } + + + public void sendEmail(MessageRequest messageRequest) { + log.debug("sendEmail() called - EAI_BATCH_URL: {}, EAI_BATCH_SEND_DIR: {}", prop.getEaiBatchUrl(), prop.getEaiBatchSendDir()); + log.debug("MessageRequest ID: {}, Email: {}", messageRequest.getId(), messageRequest.getEmail()); + + + if (StringUtils.isEmpty(messageRequest.getId())) { + log.warn("MessageRequest ID is empty"); + throw new IllegalArgumentException("MessageRequest ID is required"); + } + + if (StringUtils.isEmpty(messageRequest.getEmail())) { + log.warn("MessageRequest Email is empty for ID: {}", messageRequest.getId()); + throw new IllegalArgumentException("MessageRequest Email is required for ID: " + messageRequest.getId()); + } + + + String filename = "EMAIL_" + messageRequest.getId() + ".json"; + + JsonObject jsonObject = new JsonObject(); + jsonObject.addProperty("EMAIL", kjbSafedbWrapper.encryptNotRnnoString(messageRequest.getEmail())); + + + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + String jsonString = gson.toJson(jsonObject); + byte[] jsonBytes = null; + + try { + jsonBytes = jsonString.getBytes("euc-kr"); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + + } + + log.debug("Generated JSON({} bytes): {}", jsonBytes.length, jsonString); + log.debug("euc-kr first 10 bytes: {}...", Arrays.toString(Arrays.copyOfRange(jsonBytes, 0, 10))); + } +} From 38057809cf83e10ee0ce71ae18815214e9857d88 Mon Sep 17 00:00:00 2001 From: Rinjae Date: Mon, 20 Oct 2025 19:26:08 +0900 Subject: [PATCH 4/4] =?UTF-8?q?ums=20=EC=97=B0=EB=8F=99=20=EB=8C=80?= =?UTF-8?q?=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/META-INF/persistence.xml | 22 +- WebContent/WEB-INF/applicationContext-jpa.xml | 17 +- WebContent/WEB-INF/applicationContext.xml | 8 +- WebContent/jsp/dashmain3.jsp | 2258 +++++++++++++++++ .../common/filter/MonitoringFrontFilter.java | 1 + .../app/PortalAppApprovalListener.java | 6 +- .../user/PortalUserApprovalListener.java | 76 +- .../kjb/spring/KjbSafedbPasswordEncoder.java | 2 +- 8 files changed, 2323 insertions(+), 67 deletions(-) create mode 100644 WebContent/jsp/dashmain3.jsp rename src/main/java/com/eactive/{eai/custom => ext}/kjb/spring/KjbSafedbPasswordEncoder.java (94%) diff --git a/WebContent/META-INF/persistence.xml b/WebContent/META-INF/persistence.xml index 2668051..a013e0b 100644 --- a/WebContent/META-INF/persistence.xml +++ b/WebContent/META-INF/persistence.xml @@ -2,14 +2,11 @@ org.hibernate.jpa.HibernatePersistenceProvider jdbc/dsOBP_EMS - - - + + + - com.eactive.eai.rms.data.entity.onl.bzwkdstcd.UserBusiness - + com.eactive.eai.rms.data.entity.onl.bzwkdstcd.UserBusiness com.eactive.eai.data.entity.onl.unifbwk.UnifBwkTp false @@ -17,14 +14,11 @@ org.hibernate.jpa.HibernatePersistenceProvider jdbc/dsOBP_EMS - - - + + + - com.eactive.eai.rms.data.entity.onl.bzwkdstcd.UserBusiness - + com.eactive.eai.rms.data.entity.onl.bzwkdstcd.UserBusiness com.eactive.eai.data.entity.onl.unifbwk.UnifBwkTp false \ No newline at end of file diff --git a/WebContent/WEB-INF/applicationContext-jpa.xml b/WebContent/WEB-INF/applicationContext-jpa.xml index cd7fa7d..53b9b53 100644 --- a/WebContent/WEB-INF/applicationContext-jpa.xml +++ b/WebContent/WEB-INF/applicationContext-jpa.xml @@ -41,9 +41,7 @@ - - + @@ -66,15 +64,10 @@ - - - - - - + + + + diff --git a/WebContent/WEB-INF/applicationContext.xml b/WebContent/WEB-INF/applicationContext.xml index 5e52154..99fd189 100644 --- a/WebContent/WEB-INF/applicationContext.xml +++ b/WebContent/WEB-INF/applicationContext.xml @@ -52,10 +52,10 @@ - - + + + + diff --git a/WebContent/jsp/dashmain3.jsp b/WebContent/jsp/dashmain3.jsp new file mode 100644 index 0000000..c8cfe86 --- /dev/null +++ b/WebContent/jsp/dashmain3.jsp @@ -0,0 +1,2258 @@ +<%@ page language="java" contentType="text/html; charset=utf-8"%> +<%@ page import="java.util.List"%> +<%@ page import="com.eactive.eai.rms.common.context.MonitoringContext"%> +<%@ page import="com.eactive.eai.rms.common.util.CommonUtil"%> +<%@ page import="com.eactive.eai.rms.common.datasource.DataSourceType"%> +<%@ page import="com.eactive.eai.rms.common.datasource.DataSourceTypeManager"%> +<%@ page import="com.eactive.eai.common.util.SystemUtil"%> +<%@ include file="/jsp/common/include/localemessage.jsp" %> + +<% + response.setHeader("Pragma", "No-cache"); + response.setHeader("Cache-Control", "no-cache"); + response.setHeader("Expires", "0"); + request.setCharacterEncoding("utf-8"); + MonitoringContext monitoringContext = (MonitoringContext)CommonUtil.getBean(request, "monitoringContext"); + + String NEW_TITLE = (String) session.getAttribute(MonitoringContext.NEW_DASHBOARD_TITLE); + String fepBatchUrl = monitoringContext.getStringProperty("FEP_BATCH_SERVER", ""); + String eaiBatchUrl = monitoringContext.getStringProperty("EAI_BATCH_SERVER", ""); + + List srvList = DataSourceTypeManager.getOnlineDataSourceTypes(); + // 마지막 서버. interval 호출 시 확인을 위한 용도로 사용한다. + + int srvCnt = srvList.size(); + + String srvLast = srvList.get(srvCnt - 1).getName(); + + // 서버 리스트가 홀수 일 경우 Dummy를 추가해 짝수를 만든다. As-Is + if (srvCnt % 2 == 1) { + DataSourceType d = new DataSourceType(); + d.setName(""); + d.setText(""); + srvList.add(d); + } + +%> + + + +▣▣▣ EAI 모니터링 시스템 ▣▣▣ + + + + + + + + + + +
+
+ +
+ +
+ +
+
button
+
+ + + +
+ +

2020.02.26(수) 15:19:59

+ + + + + + + +
    +
  • " onclick="javascript:clearSmsInfo();" onfocus="blur();">SMS초기화
  • +
  • " onclick="javascript:btnSound();" onfocus="blur();" id="soundOption" >소리끄기
  • +
  • " onclick="javascript:btnPopupClose();" onfocus="blur();" >전체팝업닫기
  • +
  • " onclick="javascript:btnPopup();" onfocus="blur();" id="popOption">팝업끄기
  • +
+
+ + + + + +
+
+

MCI

+ <% for(int j = 1; j < 5; j++){ %> +
+ +
    +
  • CPU

  • +
  • MEM

  • +
  • DISK

  • +
+

<%= localeMessage.getString("dashMain.nA") %>

+
+ <%} %> +
+ +
+

EAI

+ <% for(int j = 1; j < 5; j++){ %> +
+ +
    +
  • CPU

  • +
  • MEM

  • +
  • DISK

  • +
+

<%= localeMessage.getString("dashMain.nA") %>

+
+ <%} %> +
+ +
+

FEP

+ <% for(int j = 1; j < 5; j++){ %> +
+ +
    +
  • CPU

  • +
  • MEM

  • +
  • DISK

  • +
+

<%= localeMessage.getString("dashMain.nA") %>

+
+ <%} %> +
+ +
+

OPA

+ <% for(int j = 1; j < 3; j++){ %> +
+ +
    +
  • CPU

  • +
  • MEM

  • +
  • DISK

  • +
+

<%= localeMessage.getString("dashMain.nA") %>

+
+ <%} %> +
+ +
+

<%= localeMessage.getString("dashMain.bat") %>

+ <% for(int j = 1; j < 3; j++){ %> +
+ +
    +
  • CPU

  • +
  • MEM

  • +
  • DISK

  • +
+

<%= localeMessage.getString("dashMain.nA") %>

+
+ <%} %> +
+ +
+

<%= localeMessage.getString("dashMain.bap") %>

+ <% for(int j = 1; j < 3; j++){ %> +
+ +
    +
  • CPU

  • +
  • MEM

  • +
  • DISK

  • +
+

<%= localeMessage.getString("dashMain.nA") %>

+
+ <%} %> + +
+
+ + + +
+

<%= localeMessage.getString("dashMain.tranProgTotSta") %>

+ + + + + + + + + + + + + + + + <% + int j; + if (srvCnt > 3) j = 3; + else j = srvCnt; + + for (int i = 0; i < j; i++) { + DataSourceType d = srvList.get(i); + + if (d.getName() != null && !"".equals(d.getName())) { + %> + + + + + + + + + + + + <% + } + } + %> + +
<%= localeMessage.getString("dashMain.bizGrp") %><%= localeMessage.getString("dashMain.tran") %><%= localeMessage.getString("dashMain.tranInc") %>TIMEOUT<%= localeMessage.getString("dashMain.timeOutInc") %><%= localeMessage.getString("dashMain.traErr") %><%= localeMessage.getString("dashMain.traErrInc") %><%= localeMessage.getString("dashMain.connErr") %><%= localeMessage.getString("dashMain.connErrInc") %>
<%=d.getText()%>" style="cursor: pointer">00" style="cursor: pointer">00" style="cursor: pointer">00" style="cursor: pointer">00
+ + + + + + + + + + + + + + + + + <% + for (int i = j; i < srvCnt; i++) { + DataSourceType d = srvList.get(i); + + if (d.getName() != null && !"".equals(d.getName())) { + %> + + + + + + + + + + + + <% + } + } + + %> + + + + + + + + + + + + + +
<%= localeMessage.getString("dashMain.bizGrp") %><%= localeMessage.getString("dashMain.tran") %><%= localeMessage.getString("dashMain.tranInc") %>TIMEOUT<%= localeMessage.getString("dashMain.timeOutInc") %><%= localeMessage.getString("dashMain.traErr") %><%= localeMessage.getString("dashMain.traErrInc") %><%= localeMessage.getString("dashMain.connErr") %><%= localeMessage.getString("dashMain.connErrInc") %>
<%=d.getText()%>00000000
<%= localeMessage.getString("dashMain.tot") %>00000000
+
+ + + + + + + + + + + +
<%= localeMessage.getString("dashMain.bap") %>

<%= localeMessage.getString("dashMain.norSend") %>

0

<%= localeMessage.getString("dashMain.norRecv") %>

0

<%= localeMessage.getString("dashMain.errSend") %>

0

<%= localeMessage.getString("dashMain.errRecv") %>

0

<%= localeMessage.getString("dashMain.waitSend") %>

0

<%= localeMessage.getString("dashMain.waitRecv") %>

0
+ + + + + + + + + + +
<%= localeMessage.getString("dashMain.bat") %>

<%= localeMessage.getString("dashMain.norSend") %>

0

<%= localeMessage.getString("dashMain.norRecv") %>

0

<%= localeMessage.getString("dashMain.errSend") %>

0

<%= localeMessage.getString("dashMain.errRecv") %>

0

<%= localeMessage.getString("dashMain.waitSend") %>

0

<%= localeMessage.getString("dashMain.waitRecv") %>

0
+ +
+ + + + +
+

거래처리 집계현황

+ + + + + + + + + + + + + + + +<% + for (int i = 0; i < srvCnt; i++) { + DataSourceType d = srvList.get(i); + + if (d.getName() != null && !"".equals(d.getName())) { + +%> + + + + + + + + + + + +<% + } + } + +%> + + + + + + + + + + + + +
업무그룹거래처리거래처리증가TIMEOUTTIMEOUT증가업무에러업무에러증가통신에러통신에러증가
<%=d.getText()%>00000000
합계00000000
+ + + + + + + + + + + + + + + + + + + + +
일괄전송

정상송신

0

정상수신

0

에러송신

0

에러수신

0

대기송신

0

대기수신

0
배치

정상송신

0

정상수신

0

에러송신

0

에러수신

0

대기송신

0

대기수신

0
+
+ + +
+ +
+

<%= localeMessage.getString("dashMain.errNotiSta") %>

+ + + + + + + + + + + <% +// for (int i = 1; i <= 6; i++) { + for (int i = 0; i < srvCnt+2; i++) { + %> + > + + + + + + <% + } + %> + +
<%= localeMessage.getString("dashMain.bizGrp") %><%= localeMessage.getString("dashMain.inst") %><%= localeMessage.getString("dashMain.time") %><%= localeMessage.getString("dashMain.mess") %>
+
+ + + +
+

Peak Day (TPS)

+ + + + + + + + + + + <% + for (int i = 0; i < srvCnt; i++) { + DataSourceType d = srvList.get(i); + if (d.getName() != null && !"".equals(d.getName())) { + %> + + + + + + + + + + <% + } + } + %> + + + + + + + + + + + + + +
<%= localeMessage.getString("dashMain.bizGrp") %><%= localeMessage.getString("dashMain.date") %><%= localeMessage.getString("dashMain.proUni") %>TPS
<%=d.getText()%>
<%= localeMessage.getString("dashMain.bap") %>
<%= localeMessage.getString("dashMain.bat") %>
+
+ +
+ + + + + + + + + + + + <%--