3

I'm looking for something similar to the GuiceBundle.enableAutoConfig(MyResource.class) type of functionality but for a gRPC server. EnableAutoConfig will scan through packages and register the resources as jersey components.

Is there a lib out there that will scan through packages and register resources as gRPC services? Trying to avoid manual instantiation of dependency injected/provided components.

mtical
  • 299
  • 4
  • 15
  • Did you check this out https://github.com/LogNet/grpc-spring-boot-starter? – jms Jan 27 '21 at 11:11
  • not sure, but I doubt as the API requires to pass service instances when building a server. Therefore, if there was a function like `enableAutoConfig(MyGrpcService.class)` it would also need to get all config params to build a server (port, connection recycling etc), which may be variable depending on the specific subclass of `ServerBuilder` that you are using. I always just create my service instances with `Guice.getInstance(MyService.class)` and pass them to a `ServerBuilder`. – morgwai Aug 20 '23 at 21:57

0 Answers0