Skip to content

Commit 7b03e8f

Browse files
committed
更新readme
1 parent 4dbb690 commit 7b03e8f

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,23 @@ This framework supports interoperability with standard gRPC clients (e.g., Pytho
279279

280280
### Usage Guide
281281

282-
1. **Configure Java Server**:
283-
Update `rpc-config.yaml` to enable `grpc` protocol and `protobuf` serialization:
282+
1. **Configure Java Server (gRPC Mode)**:
283+
Update `rpc-core/src/main/resources/rpc-config.yaml` as follows (copy-paste ready):
284284

285285
```yaml
286286
rpc:
287+
transport: "netty"
287288
protocol: "grpc"
288-
serializer: "protobuf"
289+
server-host: "127.0.0.1"
290+
server-port: 8080
289291
registry: "nacos"
292+
registry-address: "127.0.0.1:8848"
293+
serializer: "protobuf"
294+
proxy: "bytebuddy"
295+
load-balancer: "roundrobin"
296+
max-message-size: 8388608
290297
```
298+
After multi-language tests, switch `protocol` back to `netty` (or `http`/`http2`) for Java-to-Java calls.
291299
2. **Start the Java Provider (gRPC Mode)**:
292300
Run the following commands to build the project and start the server:
293301

README_ZH.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,23 @@ rpc:
282282

283283
### 使用指南
284284

285-
1. **配置 Java 服务端**:
286-
更新 `rpc-config.yaml` 启用 `grpc` 协议和 `protobuf` 序列化:
285+
1. **配置 Java 服务端 (gRPC 模式)**:
286+
`rpc-core/src/main/resources/rpc-config.yaml` 调整为以下配置(可直接覆盖):
287287

288288
```yaml
289289
rpc:
290+
transport: "netty"
290291
protocol: "grpc"
291-
serializer: "protobuf"
292+
server-host: "127.0.0.1"
293+
server-port: 8080
292294
registry: "nacos"
295+
registry-address: "127.0.0.1:8848"
296+
serializer: "protobuf"
297+
proxy: "bytebuddy"
298+
load-balancer: "roundrobin"
299+
max-message-size: 8388608
293300
```
301+
完成多语言联调后,如需恢复 Java-to-Java 调用,请将 `protocol` 改回 `netty`(或 `http`/`http2`)。
294302

295303
2. **启动 Java Provider (gRPC 模式)**:
296304

0 commit comments

Comments
 (0)