https://github.com/simplydemo/spring-grpc-demo
spring reactive grpc demo
https://github.com/simplydemo/spring-grpc-demo
gradle-multi-project grpc spring-webflux
Last synced: about 2 months ago
JSON representation
spring reactive grpc demo
- Host: GitHub
- URL: https://github.com/simplydemo/spring-grpc-demo
- Owner: simplydemo
- Created: 2022-04-27T08:35:25.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-16T04:51:00.000Z (almost 3 years ago)
- Last Synced: 2025-05-30T10:16:24.616Z (about 1 year ago)
- Topics: gradle-multi-project, grpc, spring-webflux
- Language: Java
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spring-grpc-demo
spring-boot 기반 gRPC 샘플 프로젝트를 구성 합니다.
## Git
```
git clone https://github.com/chiwoo-samples/spring-grpc-demo.git
git config --local user.name
git config --local user.email
```
## Install gRPC Interface Module
gRPC 메시지 및 서비스 객체는 client + server 가 서로 공유하는 객체이므로 grpc-demo-interface 모듈을 local maven 저장소에 install 합니다.
```
./gradlew clean build publishToMavenLocal --exclude-task test -p grpc-demo-interface
```
## Build Client Module
gRPC 클라이언트 모듈을 빌드 합니다.
```
./gradlew clean build --exclude-task test -p grpc-demo-client
```
## Build Server Module
gRPC 서버 모듈을 빌드 합니다.
```
./gradlew clean build --exclude-task test -p grpc-demo-server
```
## Run Server Module
```
./gradlew build bootRun --exclude-task test -p grpc-demo-server
```
## Run Client Module
```
./gradlew build bootRun --exclude-task test -p grpc-demo-client
```
## cURL
- Sync call
```
curl -v -L -X GET 'http://localhost:8081/hello' --header 'Content-Type: application/json'
```
- Async call
```
curl -v -L -X GET 'http://localhost:8081/hello-async?size=1000' --header 'Content-Type: application/json'
```
## Appendix
[Protocol Buffers](https://developers.google.com/protocol-buffers/docs/reference/overview)
[Mr-luo-hm/again-boot](https://github.com/Mr-luo-hm/again-boot)