Answer the question
In order to leave comments, you need to log in
How to add services to gRPC server at startup via Spring Boot?
I started to study GRPC framework based on examples from the Internet.
There was a question about "configuring" the GRPC server when it starts from Spring Boot via the @GRpcService annotation.
More precisely, there is the main Spring Boot class
@SpringBootApplication
public class SpringGrpcApplication {
public static void main(String args[]) {
SpringApplication.run(SpringGrpcApplication.class, args);
}
}
@GRpcService
public class HelloWorldServiceImpl extends HelloWorldServiceGrpc.HelloWorldServiceImplBase {
...
@Override
public void sayHello(Person request, StreamObserver<Greeting> responseObserver) {
...
responseObserver.onCompleted();
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question