인터페이스 헤더 어댑터 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
@@ -249,7 +249,12 @@ public class ApiInterfaceService extends OnlBaseService {
StdMessageUI stdMessageUI = stdMessageUIMapper.toVo(standardMessageInfo);
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.setApiFullPath(standardMessageInfo.getApifullpath());
@@ -257,7 +262,11 @@ public class ApiInterfaceService extends OnlBaseService {
String inboundHttpMethod;
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);
List<String> headerValues = new ArrayList<>();
@@ -36,6 +36,7 @@ public interface ApiInterfaceUIMapper {
@Mapping(source = "lastModifiedDate", target = "eailastamndyms")
@Mapping(source = "apiEnabledYn", target = "apienabledyn")
@Mapping(source = "authType", target = "authtype")
@Mapping(source = "verinfo", target = "verinfo")
@Mapping(target = "svchmseonot", constant = "0")
@Mapping(target = "svcmotivusedstcd", constant = "SYNC")
@Mapping(target = "svcprcesdsticname", constant = "SINGLE")
@@ -57,6 +58,7 @@ public interface ApiInterfaceUIMapper {
@Mapping(source = "eaiMessageEntity.authtype", target = "authType")
@Mapping(target = "lastModifiedDate", source = "eaiMessageEntity.eailastamndyms")
@Mapping(target = "svcLogLvelNo", source = "eaiMessageEntity.svcloglvelno")
@Mapping(target = "verinfo", source = "eaiMessageEntity.verinfo")
ApiInterfaceUI toVo(EAIMessageEntity eaiMessageEntity, List<ServiceMessageEntity> serviceMessageEntities);
@InheritConfiguration(name="toEaiMessageEntity")
@@ -165,6 +167,9 @@ public interface ApiInterfaceUIMapper {
String stdMessageKey = inboundAdapterGroupName + ApiInterfaceService.STEMSG_METHOD_DELIMITER + inboundMethod;
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);
}else{
if(StringUtils.isBlank(inboundRestPath)) {
@@ -43,6 +43,7 @@ public class ApiInterfaceUI {
private Integer svcLogLvelNo;
private String apiEnabledYn;
private String authType;
private String verinfo;
private Boolean isHeaderRouting;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime lastModifiedDate;