인터페이스 헤더 어댑터 REST PATH 추가가능

This commit is contained in:
eastargh
2026-04-16 11:00:26 +09:00
parent dfb5496f5e
commit e213c96994
4 changed files with 46 additions and 31 deletions
@@ -411,7 +411,7 @@
function detail(url,key){ function detail(url,key){
jsonUrl = url; jsonUrl = url;
if (!isDetail)return; if (!isDetail)return;
$("input[name='btnRadioSyncAsync']").attr('disabled', true); // $("input[name='btnRadioSyncAsync']").attr('disabled', true);
$.ajax({ $.ajax({
type : "POST", type : "POST",
url:url, url:url,
@@ -962,11 +962,13 @@
headerNames = messageKeyList; headerNames = messageKeyList;
isHeaderRouting = true; isHeaderRouting = true;
initHeaders(headerNames); initHeaders(headerNames);
$('#slideInboundRoutingRule').carousel(0); //$('#slideInboundRoutingRule').carousel(0);
$('#collapseInboundRoutingInfo').collapse('show')
setHeaderRoutingLabel(); setHeaderRoutingLabel();
}else{ }else{
isHeaderRouting = false; isHeaderRouting = false;
$('#slideInboundRoutingRule').carousel(1); $('#collapseInboundRoutingInfo').collapse('hide')
//$('#slideInboundRoutingRule').carousel(1);
} }
} }
@@ -1572,7 +1574,7 @@
<fieldset class="groupbox-border"> <fieldset class="groupbox-border">
<legend class="groupbox-border">INTERFACE TYPE</legend> <legend class="groupbox-border">INTERFACE TYPE</legend>
<div class="row"> <div class="row">
<div class="form-group col-md-3"> <!-- <div class="form-group col-md-3">
<label for="eaiBzwkDstcd"><span class="material-icons-outlined">sync</span> Sync/Async 타입</label><br> <label for="eaiBzwkDstcd"><span class="material-icons-outlined">sync</span> Sync/Async 타입</label><br>
<div class="btn-group" id="btnGroupSyncAsync" role="group"> <div class="btn-group" id="btnGroupSyncAsync" role="group">
<input type="radio" <input type="radio"
@@ -1615,7 +1617,7 @@
<i class="bi bi-share-fill"></i> S > A <i class="bi bi-share-fill"></i> S > A
</label> </label>
</div> </div>
</div> </div> -->
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label for="eaiBzwkDstcd">요청/응답 구분</label><br> <label for="eaiBzwkDstcd">요청/응답 구분</label><br>
<div class="btn-group" role="group" aria-label="Basic radio toggle button group" <div class="btn-group" role="group" aria-label="Basic radio toggle button group"
@@ -1771,36 +1773,34 @@
</select> </select>
</div> </div>
<div class="form-group col-md-8"> <div class="form-group col-md-8">
<div id="slideInboundRoutingRule" class="carousel slide" data-ride="carousel" data-interval="false"> <div id="slideInboundRoutingRule">
<div class="carousel-inner" style="margin-bottom:-20px"> <div class="row">
<div class="carousel-item"> <div class="col-md-12">
<label> <label for="inboundRestPath">
<span class="material-icons justify-content-md-start">http</span> <span class="material-icons">link</span>
수신 라우팅 정보 수신 REST PATH(URL)
</label> </label>
<div class="d-grid gap-2"> <input type="text" class="form-control" id="inboundRestPath"
<button type="button" id="headerRoutingButton" class="btn btn-primary" name="inboundRestPath" disabled>
data-bs-toggle="modal" data-bs-target="#routingModal">
수정
</button>
</div>
</div>
<div class="carousel-item active">
<div class="row">
<div class="col-md-12">
<label for="inboundRestPath">
<span class="material-icons">link</span>
수신 REST PATH(URL)
</label>
<input type="text" class="form-control" id="inboundRestPath"
name="inboundRestPath" disabled>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="collapse mt-2" id="collapseInboundRoutingInfo">
<div class="form-group col-md-12">
<label>
<span class="material-icons justify-content-md-start">http</span>
수신 라우팅 정보
</label>
<div class="d-grid gap-2">
<button type="button" id="headerRoutingButton" class="btn btn-primary"
data-bs-toggle="modal" data-bs-target="#routingModal">
수정
</button>
</div>
</div>
</div>
<div id="inboundResponseMethodPathRow" <div id="inboundResponseMethodPathRow"
x-show="showInboundResponse"> x-show="showInboundResponse">
<div id="inboundResponseRestPart" class="row"> <div id="inboundResponseRestPart" class="row">
@@ -249,7 +249,12 @@ public class ApiInterfaceService extends OnlBaseService {
StdMessageUI stdMessageUI = stdMessageUIMapper.toVo(standardMessageInfo); StdMessageUI stdMessageUI = stdMessageUIMapper.toVo(standardMessageInfo);
String stdKey = stdMessageUI.getBzwkSvcKeyName(); String stdKey = stdMessageUI.getBzwkSvcKeyName();
String inboundRestPath = StringUtils.substringAfter(stdKey, STEMSG_SERVICE_URL_DELIMITER); String inboundRestPath;
if (StringUtils.contains(stdKey, STEMSG_SERVICE_HEADER_DELIMITER)) {
inboundRestPath = StringUtils.substringBetween(stdKey, STEMSG_SERVICE_URL_DELIMITER, STEMSG_SERVICE_HEADER_DELIMITER);
} else {
inboundRestPath = StringUtils.substringAfter(stdKey, STEMSG_SERVICE_URL_DELIMITER);
}
apiInterfaceUI.setInboundRestPath(inboundRestPath); apiInterfaceUI.setInboundRestPath(inboundRestPath);
apiInterfaceUI.setApiFullPath(standardMessageInfo.getApifullpath()); apiInterfaceUI.setApiFullPath(standardMessageInfo.getApifullpath());
@@ -257,7 +262,11 @@ public class ApiInterfaceService extends OnlBaseService {
String inboundHttpMethod; String inboundHttpMethod;
if (StringUtils.contains(stdKey, STEMSG_SERVICE_HEADER_DELIMITER)) { if (StringUtils.contains(stdKey, STEMSG_SERVICE_HEADER_DELIMITER)) {
inboundHttpMethod = StringUtils.substringBetween(stdKey, STEMSG_METHOD_DELIMITER, STEMSG_SERVICE_HEADER_DELIMITER); if (StringUtils.contains(stdKey, STEMSG_SERVICE_URL_DELIMITER)) {
inboundHttpMethod = StringUtils.substringBetween(stdKey, STEMSG_METHOD_DELIMITER, STEMSG_SERVICE_URL_DELIMITER);
} else {
inboundHttpMethod = StringUtils.substringBetween(stdKey, STEMSG_METHOD_DELIMITER, STEMSG_SERVICE_HEADER_DELIMITER);
}
String headerRoutingValueString = StringUtils.substringAfter(stdKey, STEMSG_SERVICE_HEADER_DELIMITER); String headerRoutingValueString = StringUtils.substringAfter(stdKey, STEMSG_SERVICE_HEADER_DELIMITER);
List<String> headerValues = new ArrayList<>(); List<String> headerValues = new ArrayList<>();
@@ -36,6 +36,7 @@ public interface ApiInterfaceUIMapper {
@Mapping(source = "lastModifiedDate", target = "eailastamndyms") @Mapping(source = "lastModifiedDate", target = "eailastamndyms")
@Mapping(source = "apiEnabledYn", target = "apienabledyn") @Mapping(source = "apiEnabledYn", target = "apienabledyn")
@Mapping(source = "authType", target = "authtype") @Mapping(source = "authType", target = "authtype")
@Mapping(source = "verinfo", target = "verinfo")
@Mapping(target = "svchmseonot", constant = "0") @Mapping(target = "svchmseonot", constant = "0")
@Mapping(target = "svcmotivusedstcd", constant = "SYNC") @Mapping(target = "svcmotivusedstcd", constant = "SYNC")
@Mapping(target = "svcprcesdsticname", constant = "SINGLE") @Mapping(target = "svcprcesdsticname", constant = "SINGLE")
@@ -57,6 +58,7 @@ public interface ApiInterfaceUIMapper {
@Mapping(source = "eaiMessageEntity.authtype", target = "authType") @Mapping(source = "eaiMessageEntity.authtype", target = "authType")
@Mapping(target = "lastModifiedDate", source = "eaiMessageEntity.eailastamndyms") @Mapping(target = "lastModifiedDate", source = "eaiMessageEntity.eailastamndyms")
@Mapping(target = "svcLogLvelNo", source = "eaiMessageEntity.svcloglvelno") @Mapping(target = "svcLogLvelNo", source = "eaiMessageEntity.svcloglvelno")
@Mapping(target = "verinfo", source = "eaiMessageEntity.verinfo")
ApiInterfaceUI toVo(EAIMessageEntity eaiMessageEntity, List<ServiceMessageEntity> serviceMessageEntities); ApiInterfaceUI toVo(EAIMessageEntity eaiMessageEntity, List<ServiceMessageEntity> serviceMessageEntities);
@InheritConfiguration(name="toEaiMessageEntity") @InheritConfiguration(name="toEaiMessageEntity")
@@ -165,6 +167,9 @@ public interface ApiInterfaceUIMapper {
String stdMessageKey = inboundAdapterGroupName + ApiInterfaceService.STEMSG_METHOD_DELIMITER + inboundMethod; String stdMessageKey = inboundAdapterGroupName + ApiInterfaceService.STEMSG_METHOD_DELIMITER + inboundMethod;
if(vo.getIsHeaderRouting() != null && vo.getIsHeaderRouting() && headerValues != null && headerValues.size() > 0){ if(vo.getIsHeaderRouting() != null && vo.getIsHeaderRouting() && headerValues != null && headerValues.size() > 0){
if(!StringUtils.isBlank(inboundRestPath)) {
stdMessageKey += ApiInterfaceService.STEMSG_SERVICE_URL_DELIMITER + inboundRestPath;
}
stdMessageKey += ApiInterfaceService.STEMSG_SERVICE_HEADER_DELIMITER + String.join(ApiInterfaceService.STEMSG_HEADER_SEPARATOR, headerValues); stdMessageKey += ApiInterfaceService.STEMSG_SERVICE_HEADER_DELIMITER + String.join(ApiInterfaceService.STEMSG_HEADER_SEPARATOR, headerValues);
}else{ }else{
if(StringUtils.isBlank(inboundRestPath)) { if(StringUtils.isBlank(inboundRestPath)) {
@@ -43,6 +43,7 @@ public class ApiInterfaceUI {
private Integer svcLogLvelNo; private Integer svcLogLvelNo;
private String apiEnabledYn; private String apiEnabledYn;
private String authType; private String authType;
private String verinfo;
private Boolean isHeaderRouting; private Boolean isHeaderRouting;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime lastModifiedDate; private LocalDateTime lastModifiedDate;