A quick demo project to test the usage of gRPC with Spring Boot. This demo project uses the gRPC Spring Boot Starter (https://github.com/yidongnan/grpc-spring-boot-starter).
This module contains the .proto files and defines the contract for the gRPC service. In the compile goal, the .proto files are compiled with protoc to Java classes. The grpc-contract can be distributed as a maven artifact.
This module uses the grpc-contract to implement and host the gRPC service.
The grpc-client uses the grpc-contract to query the grpc-server. The location of the grpc-server is configured in the application.yaml.
Build the project
mvn clean install
Start the grpc-server
(cd ./grpc-server && mvn spring-boot:run)
Start the grpc-client
(cd ./grpc-client && mvn spring-boot:run)