feat : template 기반 AdapterErrorMessageHandler 내부오류코드별 템플릿 지정 추가
- {in 어댑터그룹명}.sys.{rspErrCd}.template 키 사용
This commit is contained in:
@@ -411,9 +411,16 @@ public class TemplateAdapterErrorMsgHandler implements AdapterErrorMessageHandle
|
||||
@Override
|
||||
public Object generateNonStandardInternalErrorResponseMessage(String inboudnAdapterGroupName, String inboudnAdapterName,
|
||||
Properties callProp, Object inboundRequestData, EAIMessage resEaiMsg) throws Exception {
|
||||
String templateKey = inboudnAdapterGroupName + ".sys.template";
|
||||
String template = PropManager.getInstance().getProperty(PROP_GROUP, templateKey);
|
||||
|
||||
String template = "";
|
||||
String templateKey = "";
|
||||
if (resEaiMsg != null && StringUtils.isNotEmpty(resEaiMsg.getRspErrCd())) {
|
||||
templateKey = inboudnAdapterGroupName + ".sys." + resEaiMsg.getRspErrCd() + ".template";
|
||||
template = PropManager.getInstance().getProperty(PROP_GROUP, templateKey);
|
||||
}
|
||||
if (StringUtils.isBlank(template)) {
|
||||
templateKey = inboudnAdapterGroupName + ".sys.template";
|
||||
template = PropManager.getInstance().getProperty(PROP_GROUP, templateKey);
|
||||
}
|
||||
if (StringUtils.isBlank(template))
|
||||
template = PropManager.getInstance().getProperty(PROP_GROUP, "default.sys.template");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user