Compare commits
2 Commits
feature/ma
...
58234b1c59
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58234b1c59 | ||
|
|
541d6d1938 |
@@ -247,7 +247,7 @@
|
|||||||
buffer = buffer.substring(eventEnd + 2);
|
buffer = buffer.substring(eventEnd + 2);
|
||||||
const dataLines = event.split('\n')
|
const dataLines = event.split('\n')
|
||||||
.filter(line => line.startsWith('data:'))
|
.filter(line => line.startsWith('data:'))
|
||||||
.map(line => line.substring(5));
|
.map(line => line.substring(5).replace(/^ /, ''));
|
||||||
|
|
||||||
if (dataLines.length > 0) onData(dataLines.join('\n'));
|
if (dataLines.length > 0) onData(dataLines.join('\n'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ package io.shinhanlife.glow;
|
|||||||
*/
|
*/
|
||||||
import java.lang.annotation.*;
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
@Deprecated(forRemoval = false)
|
||||||
@Target(ElementType.FIELD)
|
@Target(ElementType.FIELD)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Documented
|
@Documented
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package io.shinhanlife.glow;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import io.shinhanlife.glow.communication.annotation.GlowTrgmField;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package io.shinhanlife.glow.communication.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.Documented;
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/** Declares fixed-width Glow transaction-message metadata for a DTO field. */
|
||||||
|
@Target({ElementType.LOCAL_VARIABLE, ElementType.FIELD})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface GlowTrgmField {
|
||||||
|
|
||||||
|
int order();
|
||||||
|
|
||||||
|
int length() default 0;
|
||||||
|
|
||||||
|
int decimal() default 0;
|
||||||
|
|
||||||
|
String description() default "";
|
||||||
|
|
||||||
|
String target() default "";
|
||||||
|
|
||||||
|
String type() default "";
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package io.shinhanlife.glow.util;
|
package io.shinhanlife.glow.util;
|
||||||
|
|
||||||
import io.shinhanlife.glow.GlowTrgmField;
|
import io.shinhanlife.glow.communication.annotation.GlowTrgmField;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|||||||
@@ -29,14 +29,14 @@ glow:
|
|||||||
http: # HTTP 비표준 통신 설정
|
http: # HTTP 비표준 통신 설정
|
||||||
connection-timeout: 5 # 연결 타임아웃 시간 (초 단위)
|
connection-timeout: 5 # 연결 타임아웃 시간 (초 단위)
|
||||||
read-timeout: 5 # 읽기 타임아웃 시간 (초 단위)
|
read-timeout: 5 # 읽기 타임아웃 시간 (초 단위)
|
||||||
mci: # 대내MCI 통신 설정
|
mci: # 개발계 대내 MCI 통신 설정
|
||||||
host: http://host.docker.internal # 대내MCI 호스트 주소
|
host: https://dev-ichmci.shinhanlife.co.kr
|
||||||
port: 8080 # 대내MCI 포트 번호
|
port: 26160
|
||||||
uri: /mciSend # 대내MCI URI 정보
|
uri: /ntl_mci/clc_rcv
|
||||||
receive-uri: /app/mciReceive # 대내MCI 수신 URI
|
receive-uri: /itrf/mciReceive
|
||||||
connection-timeout: 5 # 연결 타임아웃 시간 (초 단위)
|
connection-timeout: 300
|
||||||
read-timeout: 30 # 읽기 타임아웃 시간 (초 단위)
|
read-timeout: 300
|
||||||
encoding: UTF-8 # 대내MCI 인코딩 정보
|
encoding: UTF-8
|
||||||
extmci: # 대외MCI 통신 설정
|
extmci: # 대외MCI 통신 설정
|
||||||
host: http://host.docker.internal # 대외MCI 호스트 주소
|
host: http://host.docker.internal # 대외MCI 호스트 주소
|
||||||
port: 8080 # 대외MCI 포트 번호
|
port: 8080 # 대외MCI 포트 번호
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package io.shinhanlife.glow.communication.annotation;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
class GlowTrgmFieldContractTest {
|
||||||
|
|
||||||
|
private static class StandardTrgmDto {
|
||||||
|
@GlowTrgmField(order = 1, length = 8, decimal = 2, description = "금액", target = "body", type = "gs")
|
||||||
|
private String amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void exposesTheStandardGlowTrgmFieldMetadata() throws Exception {
|
||||||
|
Field field = StandardTrgmDto.class.getDeclaredField("amount");
|
||||||
|
GlowTrgmField metadata = field.getAnnotation(GlowTrgmField.class);
|
||||||
|
|
||||||
|
assertEquals(1, metadata.order());
|
||||||
|
assertEquals(8, metadata.length());
|
||||||
|
assertEquals(2, metadata.decimal());
|
||||||
|
assertEquals("금액", metadata.description());
|
||||||
|
assertEquals("body", metadata.target());
|
||||||
|
assertEquals("gs", metadata.type());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
package io.shinhanlife.dap.mcc.biz.cmm.dto;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import io.shinhanlife.glow.GlowTrgmField;
|
import io.shinhanlife.glow.communication.annotation.GlowTrgmField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,14 +23,6 @@ eims:
|
|||||||
mcistring:
|
mcistring:
|
||||||
url: http://localhost:${server.port}/api/mock/esb/string
|
url: http://localhost:${server.port}/api/mock/esb/string
|
||||||
|
|
||||||
shinhan:
|
spring:
|
||||||
integration:
|
config:
|
||||||
envrTypeCd: D
|
import: optional:classpath:glow/application-glow.yml
|
||||||
eai:
|
|
||||||
url: http://10.176.32.181
|
|
||||||
internalMci:
|
|
||||||
url: http://10.176.32.173
|
|
||||||
bancaMci:
|
|
||||||
url: http://10.176.32.117
|
|
||||||
externalMci:
|
|
||||||
url: http://10.176.32.176
|
|
||||||
|
|||||||
@@ -23,14 +23,6 @@ eims:
|
|||||||
mcistring:
|
mcistring:
|
||||||
url: http://localhost:${server.port}/api/mock/esb/string
|
url: http://localhost:${server.port}/api/mock/esb/string
|
||||||
|
|
||||||
shinhan:
|
spring:
|
||||||
integration:
|
config:
|
||||||
envrTypeCd: D
|
import: optional:classpath:glow/application-glow.yml
|
||||||
eai:
|
|
||||||
url: http://10.176.32.181
|
|
||||||
internalMci:
|
|
||||||
url: http://10.176.32.173
|
|
||||||
bancaMci:
|
|
||||||
url: http://10.176.32.117
|
|
||||||
externalMci:
|
|
||||||
url: http://10.176.32.176
|
|
||||||
|
|||||||
Reference in New Issue
Block a user