fix(工作台): 修复部分模版解析错误问题

This commit is contained in:
wangjiahao
2024-12-18 15:50:15 +08:00
committed by 王嘉豪
parent 02443823f4
commit 3b5d16e58f

View File

@@ -2,6 +2,7 @@ package io.dataease.utils;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.StreamReadConstraints;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -15,6 +16,12 @@ public class JsonUtil {
private static final ObjectMapper objectMapper;
static {
objectMapper = new ObjectMapper();
// 配置更大的 StreamReadConstraints 限制
objectMapper.getFactory().setStreamReadConstraints(
StreamReadConstraints.builder()
.maxStringLength(50000000)
.build()
);
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}