From 67e6f6d59ae7f4d36c97df52eb0ccbd7add7a2a2 Mon Sep 17 00:00:00 2001 From: Rinjae Date: Wed, 24 Sep 2025 17:33:57 +0900 Subject: [PATCH 1/9] =?UTF-8?q?=EA=B4=91=EC=A3=BC=EC=9D=80=ED=96=89=20?= =?UTF-8?q?=EC=A0=84=EC=9A=A9=20password=20encoder=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/applicationContext.xml | 2 ++ .../spring/KjbSafedbPasswordEncoder.java | 20 +++++++++++++++++++ .../apim/portaluser/PortalUserManService.java | 6 ++++-- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/eactive/eai/custom/kjb/common/spring/KjbSafedbPasswordEncoder.java diff --git a/WebContent/WEB-INF/applicationContext.xml b/WebContent/WEB-INF/applicationContext.xml index 2c394c4..5e52154 100644 --- a/WebContent/WEB-INF/applicationContext.xml +++ b/WebContent/WEB-INF/applicationContext.xml @@ -54,6 +54,8 @@ + 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 new file mode 100644 index 0000000..7f61416 --- /dev/null +++ b/src/main/java/com/eactive/eai/custom/kjb/common/spring/KjbSafedbPasswordEncoder.java @@ -0,0 +1,20 @@ +package com.eactive.eai.custom.kjb.common.spring; + +import com.eactive.ext.kjb.safedb.SafeDBWrapper; +import org.springframework.security.crypto.password.PasswordEncoder; + + +public class KjbSafedbPasswordEncoder implements PasswordEncoder { + @Override + public String encode(CharSequence rawPassword) { + SafeDBWrapper safedb = SafeDBWrapper.getInstance(); + return safedb.encryptPswd(rawPassword.toString()); + } + + @Override + public boolean matches(CharSequence rawPassword, String encodedPassword) { + SafeDBWrapper safedb = SafeDBWrapper.getInstance(); + String encoded = safedb.encryptPswd(rawPassword.toString()); + return encoded.equals(encodedPassword); + } +} diff --git a/src/main/java/com/eactive/eai/rms/onl/apim/portaluser/PortalUserManService.java b/src/main/java/com/eactive/eai/rms/onl/apim/portaluser/PortalUserManService.java index 0957556..62a7ede 100644 --- a/src/main/java/com/eactive/eai/rms/onl/apim/portaluser/PortalUserManService.java +++ b/src/main/java/com/eactive/eai/rms/onl/apim/portaluser/PortalUserManService.java @@ -41,9 +41,11 @@ public class PortalUserManService extends BaseService { private final PortalOrgService portalOrgService; private final FileService fileService; private final PortalOrgManService portalOrgManService; - private final PasswordEncoder passwordEncoder; +// private final PasswordEncoder passwordEncoder; + private final PasswordEncoder kjbSafedbPasswordEncoder; private final PortalUserTermsService portalUserTermsService; + public Page selectList(Pageable pageable, PortalUserUISearch portalUserUISearch) { Page portalUser = portalUserService.findAll(pageable, portalUserUISearch); return portalUser.map(entity -> { @@ -122,7 +124,7 @@ public class PortalUserManService extends BaseService { } PortalUser portalUser = portalUserUIMapper.toEntity(portalUserUI); - portalUser.setPasswordHash(passwordEncoder.encode("!" + portalUserUI.getLoginId())); + portalUser.setPasswordHash(kjbSafedbPasswordEncoder.encode("!" + portalUserUI.getLoginId())); portalUser.setLoginFailureCount(0); portalUser.setAccountLockYn("N"); portalUser.setEmailAddr(portalUserUI.getLoginId()); From a621be0062e4cf43b0787e0c383c37e3d547f5cd Mon Sep 17 00:00:00 2001 From: daekuk Date: Fri, 26 Sep 2025 17:08:06 +0900 Subject: [PATCH 2/9] =?UTF-8?q?APIInterface=20Detail=20UI=20SyncAsync=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apim/apiInterfaceManDetail.jsp | 331 ++++++++++++------ .../transaction/apim/ApiInterfaceService.java | 44 ++- .../transaction/apim/ui/ApiInterfaceUI.java | 5 + 3 files changed, 277 insertions(+), 103 deletions(-) diff --git a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp index 9701b31..1e402a2 100644 --- a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp +++ b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp @@ -101,16 +101,31 @@ standardMessageItems: [], inboundResponseStandardMessageItems: [], fromResponseAdapter: '', + toResponseAdapter: '', inboundResponseHttpMethod: '', inboundResponseRestPath: '', - syncAsyncType: 'sync' + outboundResponseHttpMethod: '', + outboundResponseRestPath: '', + syncAsyncType: 'sync', + wordType: '1', + requestType:'S' }, // 컴퓨티드 프로퍼티 get showInboundResponse() { return this.apiInterface.syncAsyncType === 'asyncSync'; }, + + // 컴퓨티드 프로퍼티 + get showOutboundResponse() { + return this.apiInterface.syncAsyncType === 'syncAsync'; + }, })); + + // 요청/응답 disable 처리. + Alpine.store('formState', { + isReqResDisabled: false + }); }); // Alpine 컴포넌트 접근을 위한 유틸리티 함수 @@ -136,6 +151,7 @@ new makeOptions("ADPTRBZWKGROUPNAME","ADPTRBZWKGROUPDESC").setObj($("select[name=fromAdapter]")).setFormat(codeName3OptionFormat).setNoValueInclude(true).setAttr('std','ADPTRMSGPTRNCD').setData(json.fromList).rendering(); new makeOptions("ADPTRBZWKGROUPNAME","ADPTRBZWKGROUPDESC").setObj($("select[name=fromResponseAdapter]")).setFormat(codeName3OptionFormat).setNoValueInclude(true).setData(json.toList).rendering(); new makeOptions("ADPTRBZWKGROUPNAME","ADPTRBZWKGROUPDESC").setObj($("select[name=toAdapter]")).setFormat(codeName3OptionFormat).setNoValueInclude(true).setData(json.toList).rendering(); + new makeOptions("ADPTRBZWKGROUPNAME","ADPTRBZWKGROUPDESC").setObj($("select[name=toResponseAdapter]")).setFormat(codeName3OptionFormat).setNoValueInclude(true).setData(json.fromList).rendering(); //if(key == "") setSearchable(selectName); // 콤보에 searchable 설정 if (typeof callback === 'function') { @@ -196,27 +212,33 @@ // 어댑터 설정 정보 객체에 인바운드 응답 관련 설정 추가 const adapterConfig = { - inbound: { - ioType: 'inbound', - methodSelectId: '#inboundHttpMethod', - restPathInputId: '#inboundRestPath', - adapterUrlId: '#fromAdapterUrl', - }, - outbound: { - ioType: 'outbound', - methodSelectId: '#outboundHttpMethod', - restPathInputId: '#outboundRestPath', - adapterUrlId: '#toAdapterUrl', - standardOptionsId: '#standardOutboundOptions', - commonFieldId: '#commonFieldPart' - }, - inboundResponse: { - methodSelectId: '#inboundResponseHttpMethod', - restPathInputId: '#inboundResponseRestPath', - adapterUrlId: '#fromResponseAdapterUrl', - standardOptionsId: '#inboundResponseRestPart', - commonFieldId: '#inboundResponseCommonFieldPart' - } + inbound: { + ioType: 'inbound', + methodSelectId: '#inboundHttpMethod', + restPathInputId: '#inboundRestPath', + adapterUrlId: '#fromAdapterUrl', + }, + outbound: { + ioType: 'outbound', + methodSelectId: '#outboundHttpMethod', + restPathInputId: '#outboundRestPath', + adapterUrlId: '#toAdapterUrl', + standardOptionsId: '#standardOutboundOptions', + commonFieldId: '#commonFieldPart' + }, + inboundResponse: { + methodSelectId: '#inboundResponseHttpMethod', + restPathInputId: '#inboundResponseRestPath', + adapterUrlId: '#fromResponseAdapterUrl', + standardOptionsId: '#inboundResponseRestPart', + commonFieldId: '#inboundResponseCommonFieldPart' + }, + outboundResponse: { + methodSelectId: '#outboundResponseHttpMethod', + restPathInputId: '#outboundResponseRestPath', + adapterUrlId: '#toResponseAdapterUrl', + standardOptionsId: '#outboundResponseRestPart' + } }; // 어댑터 선택 변경 시 호출되는 함수 수정 @@ -373,9 +395,13 @@ $("select[name=authType]" ).val(data["authType"]); } $("select[name=fromResponseAdapter]" ).val(data["fromResponseAdapter"]);//fromResponseAdapter + + $("select[name=toResponseAdapter]" ).val(data["toResponseAdapter"]);//toResponseAdapter + $('#inboundHttpMethod').val(data.inboundHttpMethod); $('#outboundHttpMethod').val(data.outboundHttpMethod); $('#inboundResponseHttpMethod').val(data.inboundResponseHttpMethod); + $('#outboundResponseHttpMethod').val(data.outboundResponseHttpMethod); $('#svcLogLvelNo').val(data.svcLogLvelNo); if(data['inboundRequestLayout']!=null && data['outboundRequestLayout']!=null){ @@ -420,6 +446,12 @@ const inOutType = data['eaiSvcName'].slice(-1); $('#inOutType').val(inOutType); + $("input[name=btnRadioReqRes][value='" + sendRecvType + "']").prop("checked", true); + Alpine.store('formState').isReqResDisabled = true; + $("input[name=btnRadioInOut][value='" + inOutType + "']").prop("checked", true); + $("input[name=btnRadioInOut]").prop("disabled", true); + + $('#eaiBzwkDstcd').attr("readonly", "readonly"); $('#eaiSvcName').attr("readonly", "readonly"); $('#sendRecvType').attr("readonly", "readonly"); @@ -439,6 +471,7 @@ $('#cloneOrgInterfaceIdDesc').text(eaiSvcName); $("#fromResponseAdapter").change(); + $("#toResponseAdapter").change(); }, error:function(e){ alert(e.responseText); @@ -1057,6 +1090,14 @@ } }); + $("#toResponseAdapter").change(function() { + const alpineData = getApiInterface(); + if (alpineData.syncAsyncType === 'syncAsync') { + const adapterGroupName = $(this).val(); + adapterSelectChange('outboundResponse', adapterGroupName); + } + }); + $('#outboundRestPath').on('input', function() { checkTagVariableUrl(); }); @@ -1283,10 +1324,10 @@
- + - +
@@ -1303,47 +1344,81 @@
-
+
INTERFACE TYPE
+

-
- - +
+ + + + + + + + + + + +
+
+
+
+
+ + - - + + +
+
+
+
+
+ + - - -
+ + +
+
-
+
TRANSACTION OPTIONS
@@ -1408,21 +1483,37 @@
-
+
- - - -
+
+ + + +
+
+
+
+ + + +
+
@@ -1528,34 +1619,34 @@
-
-
- OUTBOUND ROUTING -
-
-
- - -
-
- - -
-
+
+
+ OUTBOUND ROUTING +
+
+
+ + +
+
+ + +
+
-
-
-
-
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+ + +
diff --git a/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceService.java b/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceService.java index 7bd2011..9629911 100644 --- a/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceService.java +++ b/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceService.java @@ -216,6 +216,20 @@ public class ApiInterfaceService extends OnlBaseService { apiInterfaceUI.setInboundResponseStandardMessageItems(convertMapToStdMessageItems(restOption.getStandardCommonFields())); } } + + if("syncAsync".equals(apiInterfaceUI.getSyncAsyncType()) && serviceMessageEntityList != null && serviceMessageEntityList.size() > 1){ + ServiceMessageEntity extraServiceMessageEntity = serviceMessageEntityList.get(1); + apiInterfaceUI.setToResponseAdapter(extraServiceMessageEntity.getPsvsysadptrbzwkgroupname()); + String restOptionStr = extraServiceMessageEntity.getRestoption(); + + if(StringUtils.isNotBlank(restOptionStr)) { + ObjectMapper mapper = new ObjectMapper(); + RestOption restOption = mapper.readValue(restOptionStr, RestOption.class); + + apiInterfaceUI.setOutboundResponseHttpMethod(restOption.getMethod()); + apiInterfaceUI.setOutboundResponseRestPath(restOption.getExtraPath()); + } + } apiInterfaceUI.setTransformYn(transformYn); apiInterfaceUI.setErrTransformYn(errTransformYn); // 추가 @@ -430,8 +444,8 @@ public class ApiInterfaceService extends OnlBaseService { public void setServiceMessageRoutingInfo(ApiInterfaceUI vo, EAIMessageEntity eaiMessageEntity, List serviceMessageEntityList) throws Exception { // 기본 요청 ServiceMessageEntity 설정 ServiceMessageEntity requestEntity = serviceMessageEntityList.get(0); - - if ("async".equals(vo.getSyncAsyncType())) { + + if ("async".equals(vo.getSyncAsyncType()) || "syncAsync".equals(vo.getSyncAsyncType())) { requestEntity.setPsvintfacdsticname("ASYN"); } @@ -462,6 +476,32 @@ public class ApiInterfaceService extends OnlBaseService { setRouteInfo(vo, vo.getInboundResponseHttpMethod(), vo.getInboundResponseRestPath(), vo.getFromResponseAdapter(), responseEntity, vo.getInboundResponseStandardMessageItems()); } + + // syncAsync 타입인 경우 응답용 ServiceMessageEntity 추가 처리 + if ("syncAsync".equals(vo.getSyncAsyncType())) { + ServiceMessageEntity responseEntity; + + // ServiceMessageEntity가 없으면 새로 생성 + if (serviceMessageEntityList.size() < 2) { + responseEntity = new ServiceMessageEntity(); + responseEntity.setId(new ServiceMessageEntityId(vo.getEaiSvcName(), 2)); + responseEntity.setEaimessage(eaiMessageEntity); + serviceMessageEntityList.add(responseEntity); + } else { + responseEntity = serviceMessageEntityList.get(1); + } + + // ServiceMessageEntity 설정 + responseEntity.setPsvsysadptrbzwkgroupname(vo.getToResponseAdapter()); + responseEntity.setPsvintfacdsticname("ASYN"); + + // REST 정보 설정 + AdapterGroupUI responseAdapter = adapterService.selectDetail(vo.getToResponseAdapter()); + String responseRoutName = getOutboundProcessorName(responseAdapter); + responseEntity.setOutbndroutname(responseRoutName); + + setRouteInfo(vo, vo.getOutboundResponseHttpMethod(), vo.getOutboundResponseRestPath(), vo.getToResponseAdapter(), responseEntity, vo.getStandardMessageItems()); + } } public static List convertMapToStdMessageItems(Map standardCommonFields) { diff --git a/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ui/ApiInterfaceUI.java b/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ui/ApiInterfaceUI.java index 7763e62..82ee29f 100644 --- a/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ui/ApiInterfaceUI.java +++ b/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ui/ApiInterfaceUI.java @@ -54,6 +54,11 @@ public class ApiInterfaceUI { private String inboundResponseHttpMethod; private String inboundResponseRestPath; private String fromResponseAdapter; + + //SYNC-ASYNC 용 + private String outboundResponseHttpMethod; + private String outboundResponseRestPath; + private String toResponseAdapter; private String inboundErrResponseLayout; private String errResponseTransform; From 95e50edb55bee250c4ed33cbb56496b6abfe7a2c Mon Sep 17 00:00:00 2001 From: Rinjae Date: Fri, 26 Sep 2025 21:18:25 +0900 Subject: [PATCH 3/9] =?UTF-8?q?kjb-safedb=20=EB=AA=A8=EB=93=88=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 1 + settings.gradle | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 8f1fafa..48c5e9f 100644 --- a/build.gradle +++ b/build.gradle @@ -76,6 +76,7 @@ dependencies { implementation project(':elink-online-common') implementation project(':elink-online-emsclient') implementation project(':elink-portal-common') + implementation project(':kjb-safedb') /* Custom Libs */ implementation fileTree(dir: 'libs', include: ['*.jar']) diff --git a/settings.gradle b/settings.gradle index c0e25bd..c36ddb9 100644 --- a/settings.gradle +++ b/settings.gradle @@ -12,4 +12,8 @@ project (':elink-online-core').projectDir = new File(settingsDir, "../eapim-onli 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") \ No newline at end of file +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 From 5f91ae64d9056accdb4365b6397388640c5f899b Mon Sep 17 00:00:00 2001 From: daekuk Date: Mon, 29 Sep 2025 11:19:20 +0900 Subject: [PATCH 4/9] =?UTF-8?q?=EC=9D=B8=ED=84=B0=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=8A=A4=20=ED=99=94=EB=A9=B4=20=EA=B8=B0=EB=8A=A5=20=EB=B0=8F?= =?UTF-8?q?=20UI=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apim/apiInterfaceManDetail.jsp | 63 ++++++++++++++----- 1 file changed, 47 insertions(+), 16 deletions(-) diff --git a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp index 1e402a2..a7cbe4c 100644 --- a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp +++ b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp @@ -48,6 +48,19 @@ background-color: #eeeeee; border-color: #cccccc; } + + /* input-group 안에서 invalid-feedback이 차지하는 공간 없애기, 유효성검사 할 때 현재 스타일 바뀌지않게 CSS 처리 */ + .input-group > .invalid-feedback { + position: absolute; + top: 100%; + left: 0; + width: 100%; + margin-top: .25rem; + } + + .input-group { + position: relative; + }