fastjson update 1.x to 2.0.2 (#4160)

This commit is contained in:
温绍锦
2022-05-13 11:32:47 +08:00
committed by GitHub
parent bac016f89e
commit ead91433d7
35 changed files with 105 additions and 112 deletions

View File

@@ -29,7 +29,7 @@ import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson2.JSON;
/**
* http client 工具类

View File

@@ -10,8 +10,8 @@ import java.util.Properties;
import org.apache.commons.lang.StringUtils;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.TypeReference;
import com.alibaba.otter.canal.common.AbstractCanalLifeCycle;
import com.alibaba.otter.canal.common.CanalException;
import com.alibaba.otter.canal.common.CanalLifeCycle;
@@ -119,7 +119,7 @@ public class PlainCanalConfigClient extends AbstractCanalLifeCycle implements Ca
heads.put("user", user);
heads.put("passwd", passwd);
String response = httpHelper.get(url, heads, REQUEST_TIMEOUT);
ResponseModel<CanalConfig> resp = JSONObject.parseObject(response,
ResponseModel<CanalConfig> resp = JSON.parseObject(response,
new TypeReference<ResponseModel<CanalConfig>>() {
});