오류 수정

2026-01-30 06:46:03 [http-nio-17811-exec-3] ERROR c.b.d.a.l.service.ListenerService - com.bsmlab.dfx.agent.support.exception.IllegalMessageException: json 메시지를 파싱할 수 없습니다.String value length (20054016) exceeds the maximum allowed (20000000, from `StreamReadConstraints.getMaxStringLength()`)
 - 500MB 이하 수신 가능하도록 수정
main
icksishu@gmail.com 2 months ago
parent 59c1f3bd43
commit 8e0964feba

@ -8,7 +8,10 @@ import com.bsmlab.dfx.agent.listener.dto.ReceiveMessageDto;
import com.bsmlab.dfx.agent.support.exception.IllegalMessageException;
import com.bsmlab.dfx.agent.support.exception.InCompleteMessageException;
import com.bsmlab.dfx.agent.support.exception.NullMessageException;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonFactoryBuilder;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.StreamReadConstraints;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
@ -23,7 +26,12 @@ import java.util.*;
@Slf4j
public class MessageUtils {
private static final ObjectMapper objectMapper = new ObjectMapper();
private static final ObjectMapper objectMapper;
static {
StreamReadConstraints constraints = StreamReadConstraints.builder().maxStringLength(500_000_000).build();
JsonFactory jsonFactory = new JsonFactoryBuilder().streamReadConstraints(constraints).build();
objectMapper = new ObjectMapper(jsonFactory);
}
private MessageUtils() {};

Loading…
Cancel
Save