Skip to content

Hi, Spring fans! In this installment we look at how to use a GRPC Spring Boot starter to build a native application

License

Notifications You must be signed in to change notification settings

spring-tips/grpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot gRPC Sample

The original project off of which this was based has since relocated.

This project is a copy one of the samples from the gRPC Spring Boot Starter. Build and run any way you like to run Spring Boot. E.g:

$ ./mvnw spring-boot:run
...

The server starts by default on port 9090. Test with gRPCurl:

$ grpcurl -d '{"name":"Hi"}' -plaintext localhost:9090 Simple.SayHello
{
  "message": "Hello ==\u003e Hi"
}

Native Image

The services compile to a GraalVM native image, too.

$ ./mvnw -Pnative native:compile
$ ./target/server

The patches needed to make it work in native were a reflection hint (upstream change: oracle/graalvm-reachability-metadata#148) and some autoconfig metadata (upstream change: https://github.com/yidongnan/grpc-spring-boot-starter/pull/775).

About

Hi, Spring fans! In this installment we look at how to use a GRPC Spring Boot starter to build a native application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages