오류응답 디폴트 형식(ERROR_MESSAGE_DEFAULT_FORMAT) 프러퍼티 설정 가능하도록 수정
- 프러퍼티 그룹 : MessageUtil - 프러퍼티 : ERROR_MESSAGE_DEFAULT_FORMAT
This commit is contained in:
@@ -23,6 +23,7 @@ import org.w3c.dom.Document;
|
|||||||
import com.eactive.eai.common.EAIKeys;
|
import com.eactive.eai.common.EAIKeys;
|
||||||
import com.eactive.eai.common.message.MessageType;
|
import com.eactive.eai.common.message.MessageType;
|
||||||
import com.eactive.eai.common.monitor.EAIServiceMonitor;
|
import com.eactive.eai.common.monitor.EAIServiceMonitor;
|
||||||
|
import com.eactive.eai.common.property.PropManager;
|
||||||
import com.eactive.eai.transformer.message.ISO8583Message;
|
import com.eactive.eai.transformer.message.ISO8583Message;
|
||||||
import com.eactive.eai.transformer.message.ISO8583MessageFactory;
|
import com.eactive.eai.transformer.message.ISO8583MessageFactory;
|
||||||
import com.eactive.eai.transformer.util.IConv;
|
import com.eactive.eai.transformer.util.IConv;
|
||||||
@@ -517,7 +518,8 @@ public final class MessageUtil {
|
|||||||
|
|
||||||
public static String makeJsonErrorMessage(String code, String msg, String errorFormat) {
|
public static String makeJsonErrorMessage(String code, String msg, String errorFormat) {
|
||||||
if (StringUtils.isBlank(errorFormat)) {
|
if (StringUtils.isBlank(errorFormat)) {
|
||||||
errorFormat = ERROR_MESSAGE_DEFAULT_FORMAT;
|
errorFormat = PropManager.getInstance().getProperty("MessageUtil",
|
||||||
|
"ERROR_MESSAGE_DEFAULT_FORMAT", ERROR_MESSAGE_DEFAULT_FORMAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// errorFormat에 %s가 1개만 있으면 msg만, 2개 이상이면 code, msg 전달
|
// errorFormat에 %s가 1개만 있으면 msg만, 2개 이상이면 code, msg 전달
|
||||||
|
|||||||
Reference in New Issue
Block a user