perf:移除hutool的http模块,使用okhttp3

This commit is contained in:
曾文豪
2024-07-30 13:39:45 +08:00
parent 450d1fb869
commit 333d283e24
19 changed files with 351 additions and 65 deletions

View File

@@ -1,7 +1,6 @@
package com.tiesheng.message.config.aliyun;
import cn.hutool.json.JSONObject;
import com.tiesheng.message.pojos.AliyunTempParam;
public interface AliyunSmsHandler {

View File

@@ -5,13 +5,12 @@ import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.SecureUtil;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.tiesheng.message.pojos.AliyunTempParam;
import com.tiesheng.message.pojos.MessageReqResp;
import com.tiesheng.message.service.TieshengMessageSender;
import com.tiesheng.util.exception.ApiException;
import com.tiesheng.util.service.http.OkHttpUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@@ -102,7 +101,7 @@ public class AliyunSmsSender implements TieshengMessageSender {
String respBody = "";
try {
respBody = HttpUtil.get(ENDPOINT + "?Signature=" + signature + sortQueryStringTmp, 10 * 1000);
respBody = OkHttpUtil.get(ENDPOINT + "?Signature=" + signature + sortQueryStringTmp);
} catch (Exception e) {
respBody = JSONUtil.createObj()
.putOpt("Code", "Error")

View File

@@ -1,4 +1,4 @@
package com.tiesheng.message.pojos;
package com.tiesheng.message.config.aliyun;
import cn.hutool.json.JSONObject;