Skip to content

Commit

Permalink
Ensure generated gRPC services are annotaed with GrpcService
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton authored and ppalaga committed May 24, 2021
1 parent a6251fa commit 02aaef9
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import java.util.List;
import java.util.Set;

import javax.inject.Singleton;

import io.grpc.BindableService;
import io.grpc.stub.AbstractAsyncStub;
import io.grpc.stub.AbstractBlockingStub;
Expand All @@ -44,6 +42,7 @@
import io.quarkus.gizmo.MethodCreator;
import io.quarkus.gizmo.MethodDescriptor;
import io.quarkus.gizmo.ResultHandle;
import io.quarkus.grpc.GrpcService;
import io.quarkus.grpc.deployment.BindableServiceBuildItem;
import org.apache.camel.component.grpc.GrpcComponent;
import org.apache.camel.component.grpc.server.GrpcMethodHandler;
Expand Down Expand Up @@ -149,7 +148,7 @@ private Set<String> generateBindableServiceBeans(BuildProducer<GeneratedBeanBuil
.interfaces(CamelQuarkusBindableService.class)
.build()) {

classCreator.addAnnotation(Singleton.class);
classCreator.addAnnotation(GrpcService.class);

FieldCreator serverMethodHandler = classCreator
.getFieldCreator("methodHandler", GrpcMethodHandler.class.getName())
Expand Down

0 comments on commit 02aaef9

Please sign in to comment.