GH-754 Add initial support for specifying grpc service

The newly added support allows one to actually specify which groc service to bootstrap in the event multiple services are available in the classpath

Resolves #754
This commit is contained in:
Oleg Zhurakousky
2021-10-11 20:46:43 +02:00
parent 778bf3b024
commit caf3cd79fb
6 changed files with 80 additions and 18 deletions

View File

@@ -30,7 +30,8 @@ public class DemoGrpcApplication {
public static void main(String[] args) throws Exception {
SpringApplication.run(DemoGrpcApplication.class, args);
SpringApplication.run(DemoGrpcApplication.class,
"--spring.cloud.function.grpc.service-class-name=org.springframework.cloud.function.grpc.ce.CloudEventHandler");
CloudEvent cloudEvent = CloudEvent.newBuilder()
.setTextData("{\"event_name\":\"SCF supports CloudEvent gRPC\"}")