FastJSON 2.x 只有个别第三方在使用,1.x 已经没有再用了,代码移除

This commit is contained in:
thinkgem
2025-05-12 11:02:30 +08:00
parent 681f4e7510
commit 8789c83942

View File

@@ -4,7 +4,6 @@
*/
package com.jeesite.common.io;
import com.alibaba.fastjson.parser.ParserConfig;
import com.jeesite.common.lang.StringUtils;
import org.springframework.boot.env.OriginTrackedMapPropertySource;
import org.springframework.boot.env.PropertiesPropertySourceLoader;
@@ -39,12 +38,12 @@ public class PropertyLoader implements org.springframework.boot.env.PropertySour
List<PropertySource<?>> propertySources = new ArrayList<>();
if (!isLoadJeeSitePropertySource) {
isLoadJeeSitePropertySource = true;
try {
// 默认开启 FastJSON 1.x 的,安全模式
ParserConfig.getGlobalInstance().setSafeMode(true);
} catch (Throwable ignored) {
// 兼容 FastJSON 2.x 的调用,忽略异常
}
// try {
// // 默认开启 FastJSON 1.x 的,安全模式
// ParserConfig.getGlobalInstance().setSafeMode(true);
// } catch (Throwable ignored) {
// // 兼容 FastJSON 2.x 的调用,忽略异常
// }
Properties properties = PropertiesUtils.getInstance().getProperties();
propertySources.add(new OriginTrackedMapPropertySource("jeesite", properties));
} else {