Compare commits
2 Commits
feature/ma
...
58234b1c59
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58234b1c59 | ||
|
|
541d6d1938 |
@@ -17,6 +17,7 @@ package io.shinhanlife.glow;
|
||||
*/
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Deprecated(forRemoval = false)
|
||||
@Target(ElementType.FIELD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.shinhanlife.glow;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.shinhanlife.glow.communication.annotation.GlowTrgmField;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
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;
|
||||
|
||||
import io.shinhanlife.glow.GlowTrgmField;
|
||||
import io.shinhanlife.glow.communication.annotation.GlowTrgmField;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -29,14 +29,14 @@ glow:
|
||||
http: # HTTP 비표준 통신 설정
|
||||
connection-timeout: 5 # 연결 타임아웃 시간 (초 단위)
|
||||
read-timeout: 5 # 읽기 타임아웃 시간 (초 단위)
|
||||
mci: # 대내MCI 통신 설정
|
||||
host: http://host.docker.internal # 대내MCI 호스트 주소
|
||||
port: 8080 # 대내MCI 포트 번호
|
||||
uri: /mciSend # 대내MCI URI 정보
|
||||
receive-uri: /app/mciReceive # 대내MCI 수신 URI
|
||||
connection-timeout: 5 # 연결 타임아웃 시간 (초 단위)
|
||||
read-timeout: 30 # 읽기 타임아웃 시간 (초 단위)
|
||||
encoding: UTF-8 # 대내MCI 인코딩 정보
|
||||
mci: # 개발계 대내 MCI 통신 설정
|
||||
host: https://dev-ichmci.shinhanlife.co.kr
|
||||
port: 26160
|
||||
uri: /ntl_mci/clc_rcv
|
||||
receive-uri: /itrf/mciReceive
|
||||
connection-timeout: 300
|
||||
read-timeout: 300
|
||||
encoding: UTF-8
|
||||
extmci: # 대외MCI 통신 설정
|
||||
host: http://host.docker.internal # 대외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;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.shinhanlife.glow.GlowTrgmField;
|
||||
import io.shinhanlife.glow.communication.annotation.GlowTrgmField;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,14 +23,6 @@ eims:
|
||||
mcistring:
|
||||
url: http://localhost:${server.port}/api/mock/esb/string
|
||||
|
||||
shinhan:
|
||||
integration:
|
||||
envrTypeCd: D
|
||||
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
|
||||
spring:
|
||||
config:
|
||||
import: optional:classpath:glow/application-glow.yml
|
||||
|
||||
@@ -23,14 +23,6 @@ eims:
|
||||
mcistring:
|
||||
url: http://localhost:${server.port}/api/mock/esb/string
|
||||
|
||||
shinhan:
|
||||
integration:
|
||||
envrTypeCd: D
|
||||
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
|
||||
spring:
|
||||
config:
|
||||
import: optional:classpath:glow/application-glow.yml
|
||||
|
||||
Reference in New Issue
Block a user