From 1ffe4f5bee20c2e1a68ad79bc6ca0c8bc468a277 Mon Sep 17 00:00:00 2001
From: acgist <289547414@qq.com>
Date: Fri, 2 Dec 2022 07:32:57 +0800
Subject: [PATCH] =?UTF-8?q?[*]=203.0.0=E6=AD=A3=E5=BC=8F=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 20 ++++++-------
pom.xml | 28 ++-----------------
.../acgist/taoyao/boot/utils/JSONUtils.java | 21 ++++++++++++++
3 files changed, 33 insertions(+), 36 deletions(-)
diff --git a/README.md b/README.md
index 7e3768c..9f7a3e9 100644
--- a/README.md
+++ b/README.md
@@ -8,18 +8,18 @@
|模块|名称|描述|
|:--|:--|:--|
|taoyao|桃夭|桃之夭夭灼灼其华|
-|taoyao-boot|基础模块|基础模块|
-|taoyao-live|直播|直播、连麦|
-|taoyao-test|测试|测试工具|
-|taoyao-media|媒体|录制、视频(水印、美颜、AI识别)、音频(降噪、混音、变声)|
+|taoyao-boot|基础|基础模块|
+|taoyao-live|直播|连麦|
+|taoyao-test|测试|测试模块|
+|taoyao-media|媒体|录制
音频(降噪、混音、变声)
视频(水印、美颜、AI识别)|
|taoyao-signal|信令|信令服务|
-|taoyao-server|启动服务|启动服务|
+|taoyao-server|服务|启动服务|
|taoyao-meeting|会议|会议模式、广播模式、单人对讲|
-|taoyao-webrtc|WebRTC模块|WebRTC模块|
-|taoyao-webrtc-sfu|WebRTC SFU架构|SFU架构|
-|taoyao-webrtc-mcu|WebRTC MCU架构|MCU架构|
-|taoyao-webrtc-mesh|WebRTC MESH架构|MESH架构|
-|taoyao-webrtc-kurento|WebRTC协议簇kurento实现|WebRTC协议簇kurento实现|
+|taoyao-webrtc|WebRTC|WebRTC模块|
+|taoyao-webrtc-sfu|SFU架构|SFU架构|
+|taoyao-webrtc-mcu|MCU架构|MCU架构|
+|taoyao-webrtc-mesh|MESH架构|MESH架构|
+|taoyao-webrtc-kurento|kurento框架|WebRTC协议簇kurento实现|
> 终端负责推流,服务端负责处理媒体流,这些功能也可以在终端实现。主次码流没在终端实现,服务端实现可以有更多选择。
diff --git a/pom.xml b/pom.xml
index 5e506a2..e4d8115 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
org.springframework.boot
spring-boot-starter-parent
- 3.0.0-RC2
+ 3.0.0
@@ -23,10 +23,9 @@
17
- 1.5.8
1.18.24
6.18.0
- 2.0.0-RC1
+ 2.0.0
1.5.3.Final
4.4
@@ -290,7 +289,6 @@
dev
- windows-x86_64
-Xms512M -Xmx1024M -XX:NewRatio=1 -XX:SurvivorRatio=2
@@ -321,7 +319,6 @@
release
release
- linux-x86_64
-Xms2048M -Xmx4096M -XX:NewRatio=1 -XX:SurvivorRatio=2
@@ -351,25 +348,4 @@
-
-
- spring-milestones
- Spring Milestones
- https://repo.spring.io/milestone
-
- false
-
-
-
-
-
- spring-milestones
- Spring Milestones
- https://repo.spring.io/milestone
-
- false
-
-
-
-
\ No newline at end of file
diff --git a/taoyao-boot/src/main/java/com/acgist/taoyao/boot/utils/JSONUtils.java b/taoyao-boot/src/main/java/com/acgist/taoyao/boot/utils/JSONUtils.java
index 3019091..4cb021f 100644
--- a/taoyao-boot/src/main/java/com/acgist/taoyao/boot/utils/JSONUtils.java
+++ b/taoyao-boot/src/main/java/com/acgist/taoyao/boot/utils/JSONUtils.java
@@ -105,6 +105,27 @@ public final class JSONUtils {
throw MessageCodeException.of(e, "JSON转Java失败:" + json);
}
}
+
+ /**
+ * JSON转Java
+ *
+ * @param Java类型
+ *
+ * @param json JSON
+ * @param type Java类型
+ *
+ * @return Java
+ */
+ public static final T toJava(String json, TypeReference type) {
+ if (Objects.isNull(json) || Objects.isNull(type)) {
+ return null;
+ }
+ try {
+ return MAPPER.readValue(json, type);
+ } catch (IOException e) {
+ throw MessageCodeException.of(e, "JSON转Java失败:" + json);
+ }
+ }
/**
* JSON转Map