Ver código fonte

AddressUtils修改

gao.qiang 1 ano atrás
pai
commit
6604fc4d67

+ 3 - 1
base-common/src/main/java/com/ozs/common/utils/ip/AddressUtils.java

@@ -1,5 +1,6 @@
 package com.ozs.common.utils.ip;
 
+import com.ozs.common.utils.HttpClientUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import com.alibaba.fastjson2.JSON;
@@ -35,7 +36,8 @@ public class AddressUtils
         {
             try
             {
-                String rspStr = HttpUtils.sendGet(IP_URL, "ip=" + ip + "&json=true", Constants.GBK);
+                log.error("url------------ {}", IP_URL+"?ip=" + ip + "&json=true");
+                String rspStr = HttpClientUtil.get(IP_URL+"?ip=" + ip + "&json=true");
                 if (StringUtils.isEmpty(rspStr))
                 {
                     log.error("获取地理位置异常 {}", ip);