Skip to content

Commit 635bcb6

Browse files
committed
refactor: move io.agora.spring.boot package to io.agora.cloud
- io.agora.spring.boot (incl. req/resp) -> io.agora.cloud, keeps the SDK free of any Spring-flavoured package naming - fix cross-package imports in DefaultRecordingEventHandler - update README/README.zh-CN accordingly - add missing junit-jupiter test dependency
1 parent 93c175b commit 635bcb6

68 files changed

Lines changed: 101 additions & 95 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ Agora (声网) platform services commonly needed by server-side applications:
3535
- **On-premise Recording** — a JNI bridge (`RecordingSDK`) to the Agora recording
3636
native library for local / on-premise recording scenarios.
3737

38-
The SDK core (packages `io.agora.media`, `io.agora.recording`, `io.agora.rtm`,
39-
`io.agora.signal`) has no framework dependency. The `io.agora.spring.boot` package
40-
provides a Spring-friendly facade (`AgoraTemplate`, `AgoraProperties`) that stays a
41-
plain POJO layer — no Spring classes are required to compile or run it.
38+
The whole SDK (including the `io.agora.cloud` REST facade with `AgoraTemplate`
39+
and `AgoraProperties`) is a plain POJO layer — no Spring classes are required to
40+
compile or run it. Spring Boot integration is provided by the separate
41+
`agora-spring-boot-starter` project.
4242

4343
What it is **not**:
4444

@@ -93,7 +93,7 @@ Version lines:
9393
| RTC client app | | agora-java-sdk (single jar) |
9494
| (channel / uid) |-->| media : RtcTokenBuilder, AccessToken |
9595
| Agora Console | | rtm/sig : RtmTokenBuilder, Signaling |
96-
| (AppId / Cert) | | spring.boot : AgoraTemplate, Operations |
96+
| (AppId / Cert) | | cloud : AgoraTemplate, Operations |
9797
| | | recording : RecordingSDK (native) |
9898
+------------------+ +---------------------+--------------------+
9999
|
@@ -162,7 +162,7 @@ accepts for the channel until the expiry timestamp.
162162
## 7. Configuration
163163

164164
This library has no runtime configuration file of its own. When used with the
165-
`io.agora.spring.boot` facade, `AgoraProperties` defines the property prefix
165+
`io.agora.cloud` facade, `AgoraProperties` defines the property prefix
166166
`agora` (constant `AgoraProperties.PREFIX`). In Spring Boot, bind it with
167167
`@ConfigurationProperties(prefix = "agora")`.
168168

@@ -198,7 +198,7 @@ agora:
198198

199199
```java
200200
import com.fasterxml.jackson.databind.ObjectMapper;
201-
import io.agora.spring.boot.*;
201+
import io.agora.cloud.*;
202202
import okhttp3.OkHttpClient;
203203
204204
AgoraProperties props = new AgoraProperties();
@@ -228,7 +228,7 @@ The operations follow the official Agora REST flow and map 1:1 to documented API
228228
→ `updateMixRecording(...)` / `updateIndividualRecording(...)` / `updateLayout(...)`
229229
→ `queryRecording(channelName, uid, resourceId, sid, mode)` → `stopRecording(channelName, uid, resourceId, sid, mode, asyncStop)`.
230230

231-
Request/response models live in `io.agora.spring.boot.req` and `io.agora.spring.boot.resp`
231+
Request/response models live in `io.agora.cloud.req` and `io.agora.cloud.resp`
232232
(e.g. `RecordingStorageConfig`, `TranscodingConfig`, `CloudRecordingQueryResponse`).
233233

234234
## 9. Testing & Build

‎README.zh-CN.md‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@
3232
- **频道管理** — REST 客户端操作:查询频道用户状态、频道用户列表、频道列表。
3333
- **本地录制** — `RecordingSDK`(JNI 桥接),对接声网录制端原生库,用于本地 / 私有化录制场景。
3434

35-
SDK 核心(`io.agora.media`、`io.agora.recording`、`io.agora.rtm`、`io.agora.signal`
36-
包)无任何框架依赖。`io.agora.spring.boot` 包提供对 Spring 友好的门面
37-
(`AgoraTemplate`、`AgoraProperties`),但始终是纯 POJO 层——编译和运行都不依赖
38-
Spring 类。
35+
整个 SDK(包括 `io.agora.cloud` 包的 REST 门面 `AgoraTemplate`、`AgoraProperties`)
36+
都是纯 POJO 层——编译和运行都不依赖任何框架类。Spring Boot 集成由独立的
37+
`agora-spring-boot-starter` 项目提供。
3938

4039
它不是:
4140

@@ -88,7 +87,7 @@ Spring 类。
8887
| RTC client app | | agora-java-sdk (single jar) |
8988
| (channel / uid) |-->| media : RtcTokenBuilder, AccessToken |
9089
| Agora Console | | rtm/sig : RtmTokenBuilder, Signaling |
91-
| (AppId / Cert) | | spring.boot : AgoraTemplate, Operations |
90+
| (AppId / Cert) | | cloud : AgoraTemplate, Operations |
9291
| | | recording : RecordingSDK (native) |
9392
+------------------+ +---------------------+--------------------+
9493
|
@@ -155,7 +154,7 @@ public class TokenDemo {
155154

156155
## 7. 配置
157156

158-
本库自身没有运行时配置文件。使用 `io.agora.spring.boot` 门面时,
157+
本库自身没有运行时配置文件。使用 `io.agora.cloud` 门面时,
159158
`AgoraProperties` 定义了属性前缀 `agora`(常量 `AgoraProperties.PREFIX`)。
160159
Spring Boot 中通过 `@ConfigurationProperties(prefix = "agora")` 绑定。
161160

@@ -190,7 +189,7 @@ agora:
190189

191190
```java
192191
import com.fasterxml.jackson.databind.ObjectMapper;
193-
import io.agora.spring.boot.*;
192+
import io.agora.cloud.*;
194193
import okhttp3.OkHttpClient;
195194
196195
AgoraProperties props = new AgoraProperties();
@@ -220,7 +219,7 @@ CloudRecordingStartResponse start = template.opsForCloudRecording().startRecordi
220219
→ `updateMixRecording(...)` / `updateIndividualRecording(...)` / `updateLayout(...)`
221220
→ `queryRecording(channelName, uid, resourceId, sid, mode)` → `stopRecording(channelName, uid, resourceId, sid, mode, asyncStop)`。
222221

223-
请求 / 响应模型位于 `io.agora.spring.boot.req` 与 `io.agora.spring.boot.resp`
222+
请求 / 响应模型位于 `io.agora.cloud.req` 与 `io.agora.cloud.resp`
224223
(如 `RecordingStorageConfig`、`TranscodingConfig`、`CloudRecordingQueryResponse`)。
225224

226225
## 9. 测试与构建

‎pom.xml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@
160160
<groupId>commons-codec</groupId>
161161
<artifactId>commons-codec</artifactId>
162162
</dependency>
163+
<!-- For JUnit Jupiter -->
164+
<dependency>
165+
<groupId>org.junit.jupiter</groupId>
166+
<artifactId>junit-jupiter</artifactId>
167+
<version>${junit-jupiter.version}</version>
168+
<scope>test</scope>
169+
</dependency>
163170
</dependencies>
164171

165172
<!-- 构建配置(Build) -->

src/main/java/io/agora/spring/boot/AgoraApiAddress.java renamed to src/main/java/io/agora/cloud/AgoraApiAddress.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.agora.spring.boot;
1+
package io.agora.cloud;
22

33
import java.text.MessageFormat;
44

src/main/java/io/agora/spring/boot/AgoraChannelManagerAsyncOperations.java renamed to src/main/java/io/agora/cloud/AgoraChannelManagerAsyncOperations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* License for the specific language governing permissions and limitations under
1414
* the License.
1515
*/
16-
package io.agora.spring.boot;
16+
package io.agora.cloud;
1717

1818
/**
1919
* Asynchronous variant of {@link AgoraChannelManagerOperations} for non-blocking

src/main/java/io/agora/spring/boot/AgoraChannelManagerOperations.java renamed to src/main/java/io/agora/cloud/AgoraChannelManagerOperations.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
* License for the specific language governing permissions and limitations under
1414
* the License.
1515
*/
16-
package io.agora.spring.boot;
16+
package io.agora.cloud;
1717

18-
import io.agora.spring.boot.resp.ChannelUserListResponse;
19-
import io.agora.spring.boot.resp.ChannelUserStateResponse;
18+
import io.agora.cloud.resp.ChannelUserListResponse;
19+
import io.agora.cloud.resp.ChannelUserStateResponse;
2020

2121
import java.io.IOException;
2222

src/main/java/io/agora/spring/boot/AgoraCloudRecordingAsyncOperations.java renamed to src/main/java/io/agora/cloud/AgoraCloudRecordingAsyncOperations.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
* License for the specific language governing permissions and limitations under
1414
* the License.
1515
*/
16-
package io.agora.spring.boot;
16+
package io.agora.cloud;
1717

1818
import com.google.common.collect.ImmutableMap;
19-
import io.agora.spring.boot.req.*;
20-
import io.agora.spring.boot.resp.CloudRecordingStartResponse;
21-
import io.agora.spring.boot.resp.CloudRecordingStopResponse;
22-
import io.agora.spring.boot.resp.CloudRecordingUpdateLayoutResponse;
23-
import io.agora.spring.boot.resp.CloudRecordingUpdateResponse;
19+
import io.agora.cloud.req.*;
20+
import io.agora.cloud.resp.CloudRecordingStartResponse;
21+
import io.agora.cloud.resp.CloudRecordingStopResponse;
22+
import io.agora.cloud.resp.CloudRecordingUpdateLayoutResponse;
23+
import io.agora.cloud.resp.CloudRecordingUpdateResponse;
2424
import org.apache.commons.lang3.StringUtils;
2525

2626
import java.io.IOException;

src/main/java/io/agora/spring/boot/AgoraCloudRecordingOperations.java renamed to src/main/java/io/agora/cloud/AgoraCloudRecordingOperations.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
* License for the specific language governing permissions and limitations under
1414
* the License.
1515
*/
16-
package io.agora.spring.boot;
16+
package io.agora.cloud;
1717

1818
import com.google.common.collect.ImmutableMap;
1919
import com.google.common.collect.Maps;
20-
import io.agora.spring.boot.req.*;
21-
import io.agora.spring.boot.resp.*;
20+
import io.agora.cloud.req.*;
21+
import io.agora.cloud.resp.*;
2222
import org.apache.commons.lang3.StringUtils;
2323

2424
import java.io.IOException;

src/main/java/io/agora/spring/boot/AgoraConstant.java renamed to src/main/java/io/agora/cloud/AgoraConstant.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.agora.spring.boot;
1+
package io.agora.cloud;
22

33
/**
44
* Constants used across the Agora Spring Boot integration, including

src/main/java/io/agora/spring/boot/AgoraOkHttp3Template.java renamed to src/main/java/io/agora/cloud/AgoraOkHttp3Template.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
* License for the specific language governing permissions and limitations under
1414
* the License.
1515
*/
16-
package io.agora.spring.boot;
16+
package io.agora.cloud;
1717

1818
import com.alibaba.fastjson2.JSONObject;
1919
import com.fasterxml.jackson.databind.ObjectMapper;
20-
import io.agora.spring.boot.resp.AgoraResponse;
20+
import io.agora.cloud.resp.AgoraResponse;
2121
import lombok.extern.slf4j.Slf4j;
2222
import okhttp3.*;
2323
// InitializingBean removed for SDK

0 commit comments

Comments
 (0)