gRPC Homepage: | grpc.io |
Spring Boot Homepage: | spring.io |
Note: Travis build failure reason: Not support for Java 9 on Travis
- What's new?
- Support for Consul
- Java 9 Support
- io.grpc (grpc-java) version:
1.7.0
- Code is in branch 1.0.0.RELEASE
- Java 9 Module Structure
Clone the repository, and add to your pom.xml
:
<!-- Spring gRPC boot -->
<dependency>
<groupId>com.grpc.service</groupId>
<artifactId>grpc-services-boot-starter</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
below property in application.yml
grpc:
port: <port>
Note: specifying above property (i.e. port) is optional. Default port is 6565
- Refer this github grpc-java page
- Right click on project and run maven update command from IDE (STS/Eclipse). It will generate protobuf resources.
- Import demo Server, Client and Eureka projects.
- Run Eureka Server.
- Run Demo Server project and wait for Eureka to register it.
- Once, Server project will get registered, start Demo Client project.
{
"message": "Hello Harsh"
}
In order to start work with project, make sure you have configured IDE/System with prerequisites steps.
- Java 9 (JDK 9) for version
2.0.0-SNAPSHOT
- Java SE Development Kit 8 (JDK 8) for version
1.0.0.RELEASE
- Spring Boot Version Must be greater than
2
- Currently Used version:
2.0.0.BUILD-SNAPSHOT
- Refer Spring Boot version
2.0.0.BUILD-SNAPSHOT
Documentation
- Install Lombok for your IDE (i.e. STS or Eclipse)
- Version to install:
1.16.16
- Installation Guide: Please refer this link
- Install protobuf file editor for IDE (i.e. STS or Eclipse
- Eclipse Marketplace - Please refer this link
- https://github.com/LogNet/grpc-spring-boot-starter
- https://github.com/ExampleDriven/spring-boot-grpc-example
Apache 2.0