mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 21:12:33 +08:00
fix(工作台): 修复部分模版解析错误问题
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user