diff --git a/ali-pay-spring-boot-starter/pom.xml b/ali-pay-spring-boot-starter/pom.xml
index 01df52d0..88e33afc 100644
--- a/ali-pay-spring-boot-starter/pom.xml
+++ b/ali-pay-spring-boot-starter/pom.xml
@@ -6,7 +6,7 @@
io.github.lunasaw
luna-fans-api
- 3.1.9
+ 3.2.0
ali-pay-spring-boot-starter
diff --git a/ali-pay-spring-boot-starter/src/main/java/io/github/lunasaw/alipay/service/AlipayService.java b/ali-pay-spring-boot-starter/src/main/java/io/github/lunasaw/alipay/service/AlipayService.java
index 12b1a235..7749a8e1 100644
--- a/ali-pay-spring-boot-starter/src/main/java/io/github/lunasaw/alipay/service/AlipayService.java
+++ b/ali-pay-spring-boot-starter/src/main/java/io/github/lunasaw/alipay/service/AlipayService.java
@@ -11,7 +11,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.alipay.api.AlipayApiException;
import com.luna.common.dto.constant.ResultCode;
import com.luna.common.exception.BaseException;
diff --git a/ali-spring-boot-starter/pom.xml b/ali-spring-boot-starter/pom.xml
index 750f684d..8ef8ca33 100644
--- a/ali-spring-boot-starter/pom.xml
+++ b/ali-spring-boot-starter/pom.xml
@@ -7,7 +7,7 @@
luna-fans-api
io.github.lunasaw
- 3.1.9
+ 3.2.0
ali-spring-boot-starter
${luna-fans-api.version}
diff --git a/ali-spring-boot-starter/src/main/java/com/luna/ali/oss/api/AliOssUploadApi.java b/ali-spring-boot-starter/src/main/java/com/luna/ali/oss/api/AliOssUploadApi.java
index c9a681fc..1a4d1952 100644
--- a/ali-spring-boot-starter/src/main/java/com/luna/ali/oss/api/AliOssUploadApi.java
+++ b/ali-spring-boot-starter/src/main/java/com/luna/ali/oss/api/AliOssUploadApi.java
@@ -13,7 +13,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.aliyun.oss.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
diff --git a/ali-spring-boot-starter/src/main/java/com/luna/ali/oss/api/AliOssWebApi.java b/ali-spring-boot-starter/src/main/java/com/luna/ali/oss/api/AliOssWebApi.java
index a41f0619..1948eb4d 100644
--- a/ali-spring-boot-starter/src/main/java/com/luna/ali/oss/api/AliOssWebApi.java
+++ b/ali-spring-boot-starter/src/main/java/com/luna/ali/oss/api/AliOssWebApi.java
@@ -1,6 +1,6 @@
package com.luna.ali.oss.api;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.aliyun.oss.common.utils.BinaryUtil;
import com.aliyun.oss.model.MatchMode;
import com.aliyun.oss.model.PolicyConditions;
diff --git a/ali-spring-boot-starter/src/main/java/com/luna/ali/oss/api/PostObjectSample.java b/ali-spring-boot-starter/src/main/java/com/luna/ali/oss/api/PostObjectSample.java
index b7ded4b0..59e48368 100644
--- a/ali-spring-boot-starter/src/main/java/com/luna/ali/oss/api/PostObjectSample.java
+++ b/ali-spring-boot-starter/src/main/java/com/luna/ali/oss/api/PostObjectSample.java
@@ -10,7 +10,7 @@
import javax.activation.MimetypesFileTypeMap;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.aliyun.oss.common.utils.BinaryUtil;
import com.aliyun.oss.internal.OSSUtils;
import com.aliyun.oss.model.Callback;
diff --git a/ali-spring-boot-starter/src/main/java/com/luna/ali/sign/AliHttpExecute.java b/ali-spring-boot-starter/src/main/java/com/luna/ali/sign/AliHttpExecute.java
index ffa4586c..65d8ef84 100644
--- a/ali-spring-boot-starter/src/main/java/com/luna/ali/sign/AliHttpExecute.java
+++ b/ali-spring-boot-starter/src/main/java/com/luna/ali/sign/AliHttpExecute.java
@@ -1,6 +1,7 @@
package com.luna.ali.sign;
import com.google.common.collect.ImmutableMap;
+import com.luna.common.encrypt.Base64Util;
import com.luna.common.net.base.HttpBaseUtils;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
@@ -89,7 +90,7 @@ public static String sign(String accessSecret, String stringToSign) throws Excep
javax.crypto.Mac mac = javax.crypto.Mac.getInstance("HmacSHA1");
mac.init(new javax.crypto.spec.SecretKeySpec(accessSecret.getBytes(StandardCharsets.UTF_8), "HmacSHA1"));
byte[] signData = mac.doFinal(stringToSign.getBytes(StandardCharsets.UTF_8));
- return new sun.misc.BASE64Encoder().encode(signData);
+ return Base64Util.encodeBase64(signData);
}
}
diff --git a/api-spring-boot-starter/pom.xml b/api-spring-boot-starter/pom.xml
index 5cbf510b..92c0032e 100644
--- a/api-spring-boot-starter/pom.xml
+++ b/api-spring-boot-starter/pom.xml
@@ -5,7 +5,7 @@
luna-fans-api
io.github.lunasaw
- 3.1.9
+ 3.2.0
4.0.0
${luna-fans-api.version}
@@ -40,7 +40,7 @@
com.baomidou
mybatis-plus-boot-starter
- 3.5.3.1
+ ${mybatis-plus.version}
diff --git a/api-spring-boot-starter/src/main/java/com/luna/api/config/XunfeiAutoConfiguration.java b/api-spring-boot-starter/src/main/java/com/luna/api/config/XunfeiAutoConfiguration.java
new file mode 100644
index 00000000..45cdfa63
--- /dev/null
+++ b/api-spring-boot-starter/src/main/java/com/luna/api/config/XunfeiAutoConfiguration.java
@@ -0,0 +1,33 @@
+package com.luna.api.config;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ComponentScans;
+
+import com.luna.api.xfyun.config.XunfeiProperties;
+
+/**
+ * @author luna
+ * @date 2024/6/20
+ */
+@AutoConfiguration
+@EnableConfigurationProperties({XunfeiAutoConfiguration.class})
+@ComponentScans(value = {@ComponentScan(value = "com.luna.api.xfyun.*")})
+@ConditionalOnClass(value = DataSourceAutoConfiguration.class)
+public class XunfeiAutoConfiguration {
+
+ private XunfeiProperties xunfeiProperties;
+
+ public XunfeiProperties getXunfeiProperties() {
+ return xunfeiProperties;
+ }
+
+ @Autowired
+ public void setXunfeiProperties(XunfeiProperties xunfeiProperties) {
+ this.xunfeiProperties = xunfeiProperties;
+ }
+}
diff --git a/api-spring-boot-starter/src/main/java/com/luna/api/email/warpper/MailWrapper.java b/api-spring-boot-starter/src/main/java/com/luna/api/email/warpper/MailWrapper.java
index 4ba8d92d..a9252208 100644
--- a/api-spring-boot-starter/src/main/java/com/luna/api/email/warpper/MailWrapper.java
+++ b/api-spring-boot-starter/src/main/java/com/luna/api/email/warpper/MailWrapper.java
@@ -1,6 +1,6 @@
package com.luna.api.email.warpper;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.luna.api.email.dto.EmailSmallDTO;
import com.luna.common.text.CharsetUtil;
import org.apache.commons.collections4.CollectionUtils;
diff --git a/api-spring-boot-starter/src/main/java/com/luna/api/smms/api/ImageApiFromString.java b/api-spring-boot-starter/src/main/java/com/luna/api/smms/api/ImageApiFromString.java
index f6d90680..c152f7c8 100644
--- a/api-spring-boot-starter/src/main/java/com/luna/api/smms/api/ImageApiFromString.java
+++ b/api-spring-boot-starter/src/main/java/com/luna/api/smms/api/ImageApiFromString.java
@@ -1,9 +1,9 @@
package com.luna.api.smms.api;
import java.util.List;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
import com.google.common.collect.ImmutableMap;
import com.luna.api.smms.dto.UploadResultDTO;
import com.luna.common.net.HttpUtils;
diff --git a/api-spring-boot-starter/src/main/java/com/luna/api/smms/api/UserApiFromFile.java b/api-spring-boot-starter/src/main/java/com/luna/api/smms/api/UserApiFromFile.java
index 0adc6108..ed21f7cf 100644
--- a/api-spring-boot-starter/src/main/java/com/luna/api/smms/api/UserApiFromFile.java
+++ b/api-spring-boot-starter/src/main/java/com/luna/api/smms/api/UserApiFromFile.java
@@ -1,6 +1,6 @@
package com.luna.api.smms.api;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.luna.api.smms.config.SmMsProperties;
import com.luna.api.smms.dto.UploadResultDTO;
import com.luna.api.smms.dto.UserProfileDTO;
diff --git a/api-spring-boot-starter/src/main/java/com/luna/api/smms/api/UserApiFromString.java b/api-spring-boot-starter/src/main/java/com/luna/api/smms/api/UserApiFromString.java
index cd489353..4e8e5b42 100644
--- a/api-spring-boot-starter/src/main/java/com/luna/api/smms/api/UserApiFromString.java
+++ b/api-spring-boot-starter/src/main/java/com/luna/api/smms/api/UserApiFromString.java
@@ -4,8 +4,8 @@
import com.luna.common.net.HttpUtils;
import com.luna.common.net.UserAgentConstant;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
import com.google.common.collect.ImmutableMap;
import com.luna.api.smms.constant.SmMsConstant;
import org.apache.hc.core5.http.HttpResponse;
diff --git a/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/config/XunfeiProperties.java b/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/config/XunfeiProperties.java
new file mode 100644
index 00000000..74b87477
--- /dev/null
+++ b/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/config/XunfeiProperties.java
@@ -0,0 +1,26 @@
+package com.luna.api.xfyun.config;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import lombok.Data;
+
+/**
+ * @Package: com.luna.api.smMs
+ * @ClassName: SmMsConfigValue
+ * @Author: luna
+ * @CreateTime: 2020/7/27 10:12
+ * @Description:
+ */
+@Component
+@ConfigurationProperties(prefix = "spring.xunfei")
+@Data
+public class XunfeiProperties {
+
+ private Boolean enable;
+
+ private String apikey;
+ private String appId;
+ private String apiSecret;
+
+}
diff --git a/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/constant/XfConstant.java b/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/constant/XfConstant.java
new file mode 100644
index 00000000..c7945032
--- /dev/null
+++ b/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/constant/XfConstant.java
@@ -0,0 +1,19 @@
+package com.luna.api.xfyun.constant;
+
+/**
+ * @author luna
+ * @date 2024/6/20
+ */
+public interface XfConstant {
+
+
+ String HOST = "https://api.xf-yun.com";
+ String PATH = "/v1/private/sf8e6aca1";
+ String REQUEST_URL = HOST + PATH;
+
+ // 控制台获取以下信息
+ String APPID = "5eae601b";
+ String API_SECRET = "f8457806d8ae791dcfd250c1b4ca2ba8";
+ String API_KEY = "d0b88051dff7906c15ab700316a2a412";
+
+}
diff --git a/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/ocr/UniversalCharacterRecognitionApi.java b/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/ocr/UniversalCharacterRecognitionApi.java
new file mode 100644
index 00000000..45f388a0
--- /dev/null
+++ b/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/ocr/UniversalCharacterRecognitionApi.java
@@ -0,0 +1,162 @@
+package com.luna.api.xfyun.ocr;
+
+import java.net.URL;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.stream.Collectors;
+
+import javax.crypto.Mac;
+import javax.crypto.spec.SecretKeySpec;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.hc.core5.http.ClassicHttpResponse;
+
+import com.alibaba.fastjson2.JSON;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Lists;
+import com.luna.api.xfyun.constant.XfConstant;
+import com.luna.api.xfyun.ocr.dto.OcrRequest;
+import com.luna.api.xfyun.ocr.dto.OcrResponse;
+import com.luna.api.xfyun.ocr.dto.OcrTextDTO;
+import com.luna.common.check.Assert;
+import com.luna.common.constant.StrPoolConstant;
+import com.luna.common.encrypt.Base64Util;
+import com.luna.common.file.FileTools;
+import com.luna.common.net.HttpUtils;
+import com.luna.common.net.HttpUtilsConstant;
+
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * @author luna
+ * @date 2024/6/20
+ */
+@Slf4j
+public class UniversalCharacterRecognitionApi {
+
+ private static final String IMAGE_PATH = "/Users/weidian/Downloads/universal_character_recognition_java_demo/example/1.jpg";
+
+ @SneakyThrows
+ public static void main(String[] args) {
+ String s = getOcrText(XfConstant.REQUEST_URL, XfConstant.API_SECRET, XfConstant.API_KEY, IMAGE_PATH);
+ System.out.println(s);
+ OcrTextDTO parse = parse(s);
+ System.out.println(JSON.toJSONString(getContent(parse)));
+ }
+
+ public static List getContent(String filePath) {
+ return getContent(XfConstant.API_SECRET, XfConstant.API_KEY, filePath);
+ }
+
+ public static List getContent(String apiSecret, String apiKey, String filePath) {
+ Assert.notNull(filePath, "文件路径不能为空");
+ String ocrText = getOcrText(XfConstant.API_SECRET, XfConstant.API_KEY, filePath);
+ if (StringUtils.isBlank(ocrText)) {
+ return Collections.emptyList();
+ }
+ return getContent(parse(ocrText));
+ }
+
+ public static List getContent(OcrTextDTO ocrTextDTO) {
+ if (ocrTextDTO == null) {
+ return new ArrayList<>();
+ }
+ List pages = ocrTextDTO.getPages();
+ if (CollectionUtils.isEmpty(pages)) {
+ return new ArrayList<>();
+ }
+
+ List> lines = pages.stream().map(OcrTextDTO.PagesItem::getLines).collect(Collectors.toList());
+ if (CollectionUtils.isEmpty(lines)) {
+ return new ArrayList<>();
+ }
+
+ ArrayList words = Lists.newArrayList();
+ for (List line : lines) {
+ if (CollectionUtils.isEmpty(line)) {
+ continue;
+ }
+ List strings = line.stream().map(OcrTextDTO.LinesItem::getWords)
+ .filter(CollectionUtils::isNotEmpty)
+ .map(e -> e.stream().map(OcrTextDTO.WordsItem::getContent)
+ .filter(StringUtils::isNotBlank)
+ .collect(Collectors.joining(StrPoolConstant.UNDERLINE)))
+ .collect(Collectors.toList());
+ if (CollectionUtils.isEmpty(strings)) {
+ continue;
+ }
+ words.addAll(strings);
+ }
+ return words;
+ }
+
+ public static OcrTextDTO parse(String data) {
+ OcrResponse ocrResponse = JSON.parseObject(data, OcrResponse.class);
+ if (ocrResponse == null) {
+ return null;
+ }
+ OcrResponse.Payload payload = ocrResponse.getPayload();
+ if (payload == null) {
+ return null;
+ }
+ String text = Optional.ofNullable(payload.getResult()).map(OcrResponse.Result::getText).orElse(StringUtils.EMPTY);
+ String result = new String(Base64Util.decodeBase64(text), StandardCharsets.UTF_8);
+ if (StringUtils.isEmpty(result)) {
+ return null;
+ }
+ return JSON.parseObject(result, OcrTextDTO.class);
+ }
+
+ private static String getOcrText(String apiSecret, String apiKey, String filePath) {
+ return getOcrText(XfConstant.REQUEST_URL, apiSecret, apiKey, filePath);
+ }
+
+ private static String getOcrText(String requestUrl, String apiSecret, String apiKey, String filePath) {
+ OcrRequest ocrRequest = new OcrRequest();
+ ocrRequest.setHeader(new OcrRequest.Header(XfConstant.APPID, 3));
+ ocrRequest.setParameter(new OcrRequest.Parameter(OcrRequest.Sf8e6aca1.getInstance()));
+ ocrRequest.setPayload(
+ new OcrRequest.Payload(OcrRequest.Sf8e6aca1DataOne.getInstance(Base64.getEncoder().encodeToString(FileTools.read(filePath)))));
+ Map param = getUrlAuthPath(requestUrl, apiSecret, apiKey);
+
+ ClassicHttpResponse classicHttpResponse =
+ HttpUtils.doPost(XfConstant.HOST, XfConstant.PATH, ImmutableMap.of("Content-Type", HttpUtilsConstant.JSON), param,
+ JSON.toJSONString(ocrRequest));
+ String s = HttpUtils.checkResponseAndGetResult(classicHttpResponse, false);
+ System.out.println(s);
+ return s;
+ }
+
+ @SneakyThrows
+ private static Map getUrlAuthPath(String requestUrl, String apiSecret, String apiKey) {
+ Assert.notNull(apiSecret, "apiSecret不能为空");
+ Assert.notNull(apiKey, "apiKey不能为空");
+
+ // 替换调schema前缀 ,原因是URL库不支持解析包含ws,wss schema的url
+ String httpRequestUrl = requestUrl.replace("ws://", "http://").replace("wss://", "https://");
+ URL url = new URL(httpRequestUrl);
+ // 获取当前日期并格式化
+ SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
+ format.setTimeZone(TimeZone.getTimeZone("GMT"));
+ String date = format.format(new Date());
+ String host = url.getHost();
+ String builder = "host: " + host + "\n" +
+ "date: " + date + "\n" +
+ "POST " + url.getPath() + " HTTP/1.1";
+ Charset charset = StandardCharsets.UTF_8;
+ Mac mac = Mac.getInstance("hmacsha256");
+ SecretKeySpec spec = new SecretKeySpec(apiSecret.getBytes(charset), "hmacsha256");
+ mac.init(spec);
+ byte[] hexDigits = mac.doFinal(builder.getBytes(charset));
+ String sha = Base64.getEncoder().encodeToString(hexDigits);
+ String authorization =
+ String.format("api_key=\"%s\", algorithm=\"%s\", headers=\"%s\", signature=\"%s\"", apiKey, "hmac-sha256", "host date request-line", sha);
+ String authBase = Base64.getEncoder().encodeToString(authorization.getBytes(charset));
+
+ return ImmutableMap.of("authorization", authBase, "host", host, "date", date);
+ }
+}
diff --git a/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/ocr/dto/OcrRequest.java b/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/ocr/dto/OcrRequest.java
new file mode 100644
index 00000000..9a232680
--- /dev/null
+++ b/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/ocr/dto/OcrRequest.java
@@ -0,0 +1,105 @@
+package com.luna.api.xfyun.ocr.dto;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+/**
+ * @author luna
+ * @date 2024/6/20
+ */
+@Data
+public class OcrRequest {
+
+ @JSONField(name = "payload")
+ private Payload payload;
+
+ @JSONField(name = "parameter")
+ private Parameter parameter;
+
+ @JSONField(name = "header")
+ private Header header;
+
+ @Data
+ @AllArgsConstructor
+ public static class Header {
+ @JSONField(name = "app_id")
+ private String appId;
+
+ @JSONField(name = "status")
+ private int status;
+ }
+
+ @Data
+ @AllArgsConstructor
+ public static class Parameter {
+
+ @JSONField(name = "sf8e6aca1")
+ private Sf8e6aca1 sf8e6aca1;
+ }
+
+ @Data
+ @AllArgsConstructor
+ public static class Payload {
+
+ @JSONField(name = "sf8e6aca1_data_1")
+ private Sf8e6aca1DataOne sf8e6aca1DataOne;
+ }
+
+ @Data
+ public static class ResultDTO {
+
+ @JSONField(name = "compress")
+ private String compress;
+
+ @JSONField(name = "format")
+ private String format;
+
+ @JSONField(name = "encoding")
+ private String encoding;
+
+ }
+
+ @Data
+ public static class Sf8e6aca1 {
+
+ @JSONField(name = "result")
+ private ResultDTO result;
+
+ @JSONField(name = "category")
+ private String category;
+
+ public static Sf8e6aca1 getInstance() {
+ ResultDTO result = new ResultDTO();
+ result.setEncoding("utf8");
+ result.setCompress("raw");
+ result.setFormat("json");
+ Sf8e6aca1 sf8e6aca1 = new Sf8e6aca1();
+ sf8e6aca1.setCategory("ch_en_public_cloud");
+ sf8e6aca1.setResult(result);
+ return sf8e6aca1;
+ }
+ }
+
+ @Data
+ public static class Sf8e6aca1DataOne {
+
+ @JSONField(name = "image")
+ private String image;
+
+ @JSONField(name = "encoding")
+ private String encoding;
+
+ @JSONField(name = "status")
+ private int status;
+
+ public static Sf8e6aca1DataOne getInstance(String base64) {
+ Sf8e6aca1DataOne sf8e6aca1DataOne = new Sf8e6aca1DataOne();
+ sf8e6aca1DataOne.setEncoding("jpg");
+ sf8e6aca1DataOne.setStatus(3);
+ sf8e6aca1DataOne.setImage(base64);
+ return sf8e6aca1DataOne;
+ }
+ }
+}
diff --git a/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/ocr/dto/OcrResponse.java b/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/ocr/dto/OcrResponse.java
new file mode 100644
index 00000000..4b77ccfe
--- /dev/null
+++ b/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/ocr/dto/OcrResponse.java
@@ -0,0 +1,51 @@
+package com.luna.api.xfyun.ocr.dto;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+
+import lombok.Data;
+
+@Data
+public class OcrResponse {
+
+ @JSONField(name = "payload")
+ private Payload payload;
+
+ @JSONField(name = "header")
+ private Header header;
+
+ @Data
+ public static class Header {
+
+ @JSONField(name = "code")
+ private int code;
+
+ @JSONField(name = "message")
+ private String message;
+
+ @JSONField(name = "sid")
+ private String sid;
+ }
+
+ @Data
+ public static class Payload {
+
+ @JSONField(name = "result")
+ private Result result;
+ }
+
+ @Data
+ public static class Result {
+
+ @JSONField(name = "compress")
+ private String compress;
+
+ @JSONField(name = "format")
+ private String format;
+
+ @JSONField(name = "text")
+ private String text;
+
+ @JSONField(name = "encoding")
+ private String encoding;
+ }
+}
\ No newline at end of file
diff --git a/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/ocr/dto/OcrTextDTO.java b/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/ocr/dto/OcrTextDTO.java
new file mode 100644
index 00000000..c4e6047e
--- /dev/null
+++ b/api-spring-boot-starter/src/main/java/com/luna/api/xfyun/ocr/dto/OcrTextDTO.java
@@ -0,0 +1,110 @@
+package com.luna.api.xfyun.ocr.dto;
+
+import java.util.List;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+
+import lombok.Data;
+
+@Data
+public class OcrTextDTO {
+
+ @JSONField(name = "pages")
+ private List pages;
+
+ @JSONField(name = "category")
+ private String category;
+
+ @JSONField(name = "version")
+ private String version;
+
+ @Data
+ public static class PagesItem {
+
+ @JSONField(name = "exception")
+ private int exception;
+
+ @JSONField(name = "width")
+ private int width;
+
+ @JSONField(name = "angle")
+ private int angle;
+
+ @JSONField(name = "lines")
+ private List lines;
+
+ @JSONField(name = "height")
+ private int height;
+ }
+
+ @Data
+ public static class CenterPoint {
+
+ @JSONField(name = "x")
+ private int X;
+
+ @JSONField(name = "y")
+ private int Y;
+ }
+
+ @Data
+ public static class LinesItem {
+
+ @JSONField(name = "exception")
+ private int exception;
+
+ @JSONField(name = "coord")
+ private List coord;
+
+ @JSONField(name = "words")
+ private List words;
+
+ @JSONField(name = "angle")
+ private int angle;
+
+ @JSONField(name = "conf")
+ private double conf;
+
+ @JSONField(name = "word_units")
+ private List wordUnits;
+ }
+
+ @Data
+ public static class CoordItem {
+
+ @JSONField(name = "x")
+ private int X;
+
+ @JSONField(name = "y")
+ private int Y;
+ }
+
+ @Data
+ public static class WordsItem {
+
+ @JSONField(name = "coord")
+ private List coord;
+
+ @JSONField(name = "conf")
+ private double conf;
+
+ @JSONField(name = "content")
+ private String content;
+ }
+
+ @Data
+ public static class WordUnitsItem {
+
+ @JSONField(name = "center_point")
+ private CenterPoint centerPoint;
+
+ @JSONField(name = "coord")
+ private List coord;
+
+ @JSONField(name = "conf")
+ private double conf;
+
+ @JSONField(name = "content")
+ private String content;
+ }
+}
\ No newline at end of file
diff --git a/api-spring-boot-starter/src/main/resources/META-INF/spring.factories b/api-spring-boot-starter/src/main/resources/META-INF/spring.factories
index a584082f..3b02810d 100644
--- a/api-spring-boot-starter/src/main/resources/META-INF/spring.factories
+++ b/api-spring-boot-starter/src/main/resources/META-INF/spring.factories
@@ -1,2 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-com.luna.api.config.ApiAutoConfiguration,org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration
\ No newline at end of file
+com.luna.api.config.ApiAutoConfiguration,org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration,com.luna.api.config.XunfeiAutoConfiguration
\ No newline at end of file
diff --git a/api-spring-boot-starter/src/main/resources/application-pro.yml b/api-spring-boot-starter/src/main/resources/application-pro.yml
index 2204a51e..77b5634c 100644
--- a/api-spring-boot-starter/src/main/resources/application-pro.yml
+++ b/api-spring-boot-starter/src/main/resources/application-pro.yml
@@ -6,6 +6,12 @@ spring:
password: qyEF63QVT4!NwT9
username: luna_nov
+ xunfei:
+ enable: true
+ app-id: "5eae601b"
+ api-secret: "f8457806d8ae791dcfd250c1b4ca2ba8"
+ apikey: "d0b88051dff7906c15ab700316a2a412"
+
mail:
default-encoding: UTF-8
host: smtp.qq.com
diff --git a/baidu-spring-boot-starter/pom.xml b/baidu-spring-boot-starter/pom.xml
index 7d761b50..518331c0 100644
--- a/baidu-spring-boot-starter/pom.xml
+++ b/baidu-spring-boot-starter/pom.xml
@@ -7,7 +7,7 @@
luna-fans-api
io.github.lunasaw
- 3.1.9
+ 3.2.0
baidu-spring-boot-starter
baidu-spring-boot-starter
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduAddressApi.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduAddressApi.java
index 77cde968..8a2b8fbb 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduAddressApi.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduAddressApi.java
@@ -11,7 +11,7 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.hc.core5.http.HttpResponse;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.luna.baidu.dto.map.ip2address.AddressResultDTO;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduBodyApi.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduBodyApi.java
index 477e7db7..d297532b 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduBodyApi.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduBodyApi.java
@@ -12,7 +12,7 @@
import com.luna.common.text.CharsetUtil;
import org.apache.hc.core5.http.HttpResponse;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
import com.luna.baidu.dto.body.BodyCheckDTO;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduCreationApi.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduCreationApi.java
index 69d339d8..5e41df2e 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduCreationApi.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduCreationApi.java
@@ -9,8 +9,8 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.hc.core5.http.HttpResponse;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
import com.google.common.collect.ImmutableMap;
import com.luna.baidu.dto.write.EventContextDTO;
import com.luna.baidu.dto.write.HotEventDTO;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduFaceApi.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduFaceApi.java
index 1c841e73..040c51e6 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduFaceApi.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduFaceApi.java
@@ -24,7 +24,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.luna.baidu.req.face.FaceLiveReq;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduGoodsIdentifyApi.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduGoodsIdentifyApi.java
index 6fec3d8c..839158dc 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduGoodsIdentifyApi.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduGoodsIdentifyApi.java
@@ -11,7 +11,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
import com.luna.baidu.dto.goods.GoodsInfoDTO;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduOcrApi.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduOcrApi.java
index 2feb05aa..d35c5b49 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduOcrApi.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduOcrApi.java
@@ -18,7 +18,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
/**
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduTextApi.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduTextApi.java
index 7986e956..287b7668 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduTextApi.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduTextApi.java
@@ -12,8 +12,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.luna.baidu.dto.text.TextSimilarResultDTO;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduUserFaceApi.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduUserFaceApi.java
index f773f227..5f5867af 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduUserFaceApi.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduUserFaceApi.java
@@ -10,7 +10,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.luna.baidu.dto.face.UserFaceListResultDTO;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduUserFaceGroupApi.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduUserFaceGroupApi.java
index 7fc6c166..36016f06 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduUserFaceGroupApi.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduUserFaceGroupApi.java
@@ -10,7 +10,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.luna.baidu.dto.face.UserFaceListResultDTO;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduVoiceApi.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduVoiceApi.java
index f7fca40e..d49bf04a 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduVoiceApi.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/api/BaiduVoiceApi.java
@@ -19,6 +19,7 @@
import com.luna.baidu.req.voice.VoiceSynthesisReq;
import com.luna.baidu.req.voice.VoiceSynthesisResponse;
import com.luna.baidu.req.voice.VoiceSynthesisV2Req;
+import com.luna.common.check.Assert;
import com.luna.common.file.FileNameUtil;
import com.luna.common.file.FileTools;
import com.luna.common.net.HttpUtils;
@@ -26,13 +27,12 @@
import com.luna.common.os.SystemInfoUtil;
import com.luna.common.encrypt.Base64Util;
import com.luna.common.text.CharsetUtil;
-import com.luna.common.utils.Assert;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.hc.core5.http.HttpResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/config/BaiduKeyGenerate.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/config/BaiduKeyGenerate.java
index 3490180c..1f15bb55 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/config/BaiduKeyGenerate.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/config/BaiduKeyGenerate.java
@@ -1,7 +1,7 @@
package com.luna.baidu.config;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
import com.google.common.collect.ImmutableMap;
import com.luna.common.date.DateUtils;
import com.luna.common.net.HttpUtils;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/face/IdCardAllInfoDTO.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/face/IdCardAllInfoDTO.java
index edae1dec..c5a7fb77 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/face/IdCardAllInfoDTO.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/face/IdCardAllInfoDTO.java
@@ -1,7 +1,7 @@
package com.luna.baidu.dto.face;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.annotation.JSONField;
/**
* @Package: com.luna.baidu.dto.face
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/map/BaiduMapLocation.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/map/BaiduMapLocation.java
index 8087e8fe..920cd281 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/map/BaiduMapLocation.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/map/BaiduMapLocation.java
@@ -1,7 +1,7 @@
package com.luna.baidu.dto.map;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.annotation.JSONField;
import com.luna.common.file.FileTools;
import com.luna.common.io.IoUtil;
import lombok.Data;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/voice/VoiceDetailResult.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/voice/VoiceDetailResult.java
index 0fa886db..8b996806 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/voice/VoiceDetailResult.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/voice/VoiceDetailResult.java
@@ -1,6 +1,6 @@
package com.luna.baidu.dto.voice;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import java.util.List;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/voice/VoiceSynthesisDetailResponse.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/voice/VoiceSynthesisDetailResponse.java
index f852694c..fc9b43ef 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/voice/VoiceSynthesisDetailResponse.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/dto/voice/VoiceSynthesisDetailResponse.java
@@ -1,6 +1,6 @@
package com.luna.baidu.dto.voice;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import java.util.List;
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/req/face/FaceLiveReq.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/req/face/FaceLiveReq.java
index df56cc25..08ddc48d 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/req/face/FaceLiveReq.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/req/face/FaceLiveReq.java
@@ -1,6 +1,6 @@
package com.luna.baidu.req.face;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
/**
diff --git a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/req/voice/VoiceCheckReq.java b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/req/voice/VoiceCheckReq.java
index e7ff51b3..4379871f 100644
--- a/baidu-spring-boot-starter/src/main/java/com/luna/baidu/req/voice/VoiceCheckReq.java
+++ b/baidu-spring-boot-starter/src/main/java/com/luna/baidu/req/voice/VoiceCheckReq.java
@@ -1,6 +1,6 @@
package com.luna.baidu.req.voice;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.annotation.JSONField;
/**
* @author luna
diff --git a/pom.xml b/pom.xml
index 453e31f0..d9e073fe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
io.github.lunasaw
luna-fans-api
pom
- 3.1.9
+ 3.2.0
luna-fans-api
fans API Toolkit
https://lunasaw.github.io/${project.name}
@@ -27,10 +27,11 @@
1.8
UTF-8
UTF-8
- 2.7.10
- 2.4.3
- 3.1.9
+ 2.7.18
+ 2.6.1
+ 3.2.0
lunasaw
+ 5.3.1
diff --git a/tencent-pay-spring-boot-starter/pom.xml b/tencent-pay-spring-boot-starter/pom.xml
index fe280184..a57e2a48 100644
--- a/tencent-pay-spring-boot-starter/pom.xml
+++ b/tencent-pay-spring-boot-starter/pom.xml
@@ -6,7 +6,7 @@
io.github.lunasaw
luna-fans-api
- 3.1.9
+ 3.2.0
tencent-pay-spring-boot-starter
@@ -27,7 +27,7 @@
com.tencentcloudapi
tencentcloud-speech-sdk-java
- 1.0.23
+ 1.0.46
\ No newline at end of file
diff --git a/tencent-pay-spring-boot-starter/src/main/java/io/github/lunasaw/pay/api/TencentPayApi.java b/tencent-pay-spring-boot-starter/src/main/java/io/github/lunasaw/pay/api/TencentPayApi.java
index fdfa507b..c68c25c1 100644
--- a/tencent-pay-spring-boot-starter/src/main/java/io/github/lunasaw/pay/api/TencentPayApi.java
+++ b/tencent-pay-spring-boot-starter/src/main/java/io/github/lunasaw/pay/api/TencentPayApi.java
@@ -14,7 +14,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.luna.common.dto.constant.ResultCode;
diff --git a/tencent-pay-spring-boot-starter/src/main/java/io/github/lunasaw/pay/nortify/TencentPayNotifyService.java b/tencent-pay-spring-boot-starter/src/main/java/io/github/lunasaw/pay/nortify/TencentPayNotifyService.java
index 213f6139..917c7e13 100644
--- a/tencent-pay-spring-boot-starter/src/main/java/io/github/lunasaw/pay/nortify/TencentPayNotifyService.java
+++ b/tencent-pay-spring-boot-starter/src/main/java/io/github/lunasaw/pay/nortify/TencentPayNotifyService.java
@@ -8,7 +8,7 @@
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.luna.common.dto.constant.ResultCode;
import io.github.lunasaw.pay.dto.NotifyResultDTO;
diff --git a/tencent-spring-boot-starter/pom.xml b/tencent-spring-boot-starter/pom.xml
index 7b10e710..d88b781f 100644
--- a/tencent-spring-boot-starter/pom.xml
+++ b/tencent-spring-boot-starter/pom.xml
@@ -6,7 +6,7 @@
luna-fans-api
io.github.lunasaw
- 3.1.9
+ 3.2.0
tencent-spring-boot-starter
${luna-fans-api.version}
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentAuthAPI.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentAuthAPI.java
index 738e1f69..a3f8f074 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentAuthAPI.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentAuthAPI.java
@@ -13,7 +13,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.Maps;
import com.luna.tencent.response.card.IdCardAndBankCardCheckInfoResponse;
import com.luna.tencent.response.card.IdCardCheckInfoResponse;
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentFaceApi.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentFaceApi.java
index 8cca4685..48f47152 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentFaceApi.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentFaceApi.java
@@ -9,9 +9,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
import com.google.common.collect.Maps;
import com.luna.tencent.response.group.CompareFaceResponse;
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentGroupPersonApi.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentGroupPersonApi.java
index 17b368cf..d4e531ef 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentGroupPersonApi.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentGroupPersonApi.java
@@ -15,9 +15,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
import com.google.common.collect.Maps;
import com.luna.tencent.dto.error.ErrorDTO;
import com.luna.tencent.dto.face.FaceInfosDTO;
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentHotWordsApi.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentHotWordsApi.java
index 3de1792f..c8bebea0 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentHotWordsApi.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentHotWordsApi.java
@@ -1,7 +1,7 @@
package com.luna.tencent.api;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentMapApi.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentMapApi.java
index 4f67ad05..82813dfc 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentMapApi.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentMapApi.java
@@ -12,7 +12,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.luna.common.dto.constant.ResultCode;
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentMarketApi.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentMarketApi.java
index 2469fa8e..72ba4cd9 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentMarketApi.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentMarketApi.java
@@ -6,13 +6,13 @@
import java.text.SimpleDateFormat;
import java.util.*;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.luna.common.net.HttpUtils;
import org.apache.hc.core5.http.HttpResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSONObject;
/**
* @author Luna@win10
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentMessageApi.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentMessageApi.java
index 4cdc4d32..7ee935f7 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentMessageApi.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentMessageApi.java
@@ -9,7 +9,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.Maps;
/**
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentRealTimeVoiceApi.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentRealTimeVoiceApi.java
index 396184a4..de4ad927 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentRealTimeVoiceApi.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencentRealTimeVoiceApi.java
@@ -1,6 +1,6 @@
package com.luna.tencent.api;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.luna.common.file.FileTools;
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencntVoiceApi.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencntVoiceApi.java
index d9d036a6..e18734cb 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencntVoiceApi.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/api/TencntVoiceApi.java
@@ -1,7 +1,7 @@
package com.luna.tencent.api;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
import com.google.common.collect.ImmutableMap;
import com.luna.common.file.FileTools;
import com.luna.common.map.ChainTreeMap;
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/dto/hotword/HotWordDTO.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/dto/hotword/HotWordDTO.java
index 97ba1ac1..4573c7a6 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/dto/hotword/HotWordDTO.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/dto/hotword/HotWordDTO.java
@@ -5,7 +5,7 @@
package com.luna.tencent.dto.hotword;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.annotation.JSONField;
/**
* @author luna
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/dto/hotword/VocabDTO.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/dto/hotword/VocabDTO.java
index 97bf2c9e..a0a25182 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/dto/hotword/VocabDTO.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/dto/hotword/VocabDTO.java
@@ -5,7 +5,7 @@
package com.luna.tencent.dto.hotword;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.annotation.JSONField;
/**
* @author luna
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/FlashRecognitionResponse.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/FlashRecognitionResponse.java
index 9cb40101..5ec0827b 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/FlashRecognitionResponse.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/FlashRecognitionResponse.java
@@ -5,7 +5,7 @@
package com.luna.tencent.response.voice;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.annotation.JSONField;
import java.util.List;
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/SpeechRecognitionResponse.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/SpeechRecognitionResponse.java
index 50461205..15e57d1f 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/SpeechRecognitionResponse.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/SpeechRecognitionResponse.java
@@ -5,7 +5,7 @@
package com.luna.tencent.response.voice;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.List;
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/SpeechRecognitionResponseResult.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/SpeechRecognitionResponseResult.java
index c58d16c2..5a33bd77 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/SpeechRecognitionResponseResult.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/SpeechRecognitionResponseResult.java
@@ -5,7 +5,7 @@
package com.luna.tencent.response.voice;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.annotation.JSONField;
import java.util.List;
/**
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/VoiceIdentifyResponse.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/VoiceIdentifyResponse.java
index cf8089aa..00655228 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/VoiceIdentifyResponse.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/VoiceIdentifyResponse.java
@@ -1,6 +1,6 @@
package com.luna.tencent.response.voice;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.annotation.JSONField;
/**
* @author luna
diff --git a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/VoiceOneMinutesResponse.java b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/VoiceOneMinutesResponse.java
index ab9a7fae..d792504b 100644
--- a/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/VoiceOneMinutesResponse.java
+++ b/tencent-spring-boot-starter/src/main/java/com/luna/tencent/response/voice/VoiceOneMinutesResponse.java
@@ -1,6 +1,6 @@
package com.luna.tencent.response.voice;
-import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.annotation.JSONField;
import com.tencentcloudapi.asr.v20190614.models.SentenceWord;
import java.util.List;
diff --git a/test-luna-fans-api/pom.xml b/test-luna-fans-api/pom.xml
index 6a642fb9..1b553e1d 100644
--- a/test-luna-fans-api/pom.xml
+++ b/test-luna-fans-api/pom.xml
@@ -15,10 +15,11 @@
1.8
UTF-8
UTF-8
- 2.7.10
- 2.4.3
- 3.1.9
+ 2.7.18
+ 2.6.1
+ 3.2.0
lunasaw
+ 5.3.1
diff --git a/test-luna-fans-api/src/test/java/io/github/lunasaw/BaseTest.java b/test-luna-fans-api/src/test/java/io/github/lunasaw/BaseTest.java
index 0cd5b110..dca6c82b 100644
--- a/test-luna-fans-api/src/test/java/io/github/lunasaw/BaseTest.java
+++ b/test-luna-fans-api/src/test/java/io/github/lunasaw/BaseTest.java
@@ -1,6 +1,6 @@
package io.github.lunasaw;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.luna.api.email.service.MessageService;
import com.luna.api.email.service.TemplateService;
import io.github.lunasaw.listener.ApiMethodListener;
diff --git a/test-luna-fans-api/src/test/java/io/github/lunasaw/ali/AliFaceApiTest.java b/test-luna-fans-api/src/test/java/io/github/lunasaw/ali/AliFaceApiTest.java
index 3fda2286..3a64e73b 100644
--- a/test-luna-fans-api/src/test/java/io/github/lunasaw/ali/AliFaceApiTest.java
+++ b/test-luna-fans-api/src/test/java/io/github/lunasaw/ali/AliFaceApiTest.java
@@ -1,6 +1,6 @@
package io.github.lunasaw.ali;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.aliyun.facebody20191230.models.DetectFaceResponse;
import com.aliyun.facebody20191230.models.RecognizeExpressionResponse;
import com.aliyun.facebody20191230.models.RecognizeFaceResponse;
diff --git a/test-luna-fans-api/src/test/java/io/github/lunasaw/baidu/BaiduTest.java b/test-luna-fans-api/src/test/java/io/github/lunasaw/baidu/BaiduTest.java
index 238115f7..ac02d9df 100644
--- a/test-luna-fans-api/src/test/java/io/github/lunasaw/baidu/BaiduTest.java
+++ b/test-luna-fans-api/src/test/java/io/github/lunasaw/baidu/BaiduTest.java
@@ -1,6 +1,6 @@
package io.github.lunasaw.baidu;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import com.luna.baidu.api.BaiduVoiceApi;
diff --git a/test-luna-fans-api/src/test/java/io/github/lunasaw/baidu/map/BaiduMapTest.java b/test-luna-fans-api/src/test/java/io/github/lunasaw/baidu/map/BaiduMapTest.java
index 06dcc315..9d57124d 100644
--- a/test-luna-fans-api/src/test/java/io/github/lunasaw/baidu/map/BaiduMapTest.java
+++ b/test-luna-fans-api/src/test/java/io/github/lunasaw/baidu/map/BaiduMapTest.java
@@ -1,6 +1,6 @@
package io.github.lunasaw.baidu.map;
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.JSON;
import com.luna.baidu.api.BaiduAddressApi;
import com.luna.baidu.config.BaiduProperties;
import com.luna.baidu.dto.map.BaiduMapLocation;