mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fastjson update 1.x to 2.0.2 (#4160)
This commit is contained in:
@@ -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 工具类
|
||||
|
||||
@@ -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>>() {
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user