diff --git a/docs/zh/start/uds/start.md b/docs/zh/start/uds/start.md index 03efab0d4e..89cc4a2f50 100644 --- a/docs/zh/start/uds/start.md +++ b/docs/zh/start/uds/start.md @@ -74,6 +74,10 @@ go build -o layotto ``` ### step 2. 启动测试demo + +#### **Go** + +构建、运行 go 语言 demo: Layotto提供了通过UDS调用gRPC接口的示例 [demo](https://github.com/mosn/layotto/blob/main/demo/uds/client.go) @@ -85,3 +89,40 @@ go build client.go ./client ``` +#### **Java** + +构建、运行 java 语言 demo: + +Layotto java-sdk已经支持通过UDS调用gRPC接口 + +```shell @if.not.exist java-sdk +git clone https://github.com/layotto/java-sdk +``` + +切换目录: + +```shell +cd java-sdk +``` + +构建: + +```shell @if.not.exist examples-uds/target/examples-uds-jar-with-dependencies.jar +# build example jar +mvn -f examples-uds/pom.xml clean package +``` + +运行: + +``` +java -jar examples-uds/target/examples-uds-jar-with-dependencies.jar +``` + +打印出以下信息说明运行成功: + +```bash +greeting, helloworld +``` + + +