From 1807506c61171b2d58ee376ff995e16a3c518c42 Mon Sep 17 00:00:00 2001 From: Martin Kouba Date: Thu, 3 Jun 2021 15:24:06 +0200 Subject: [PATCH] Make sure the gRPC server is started after synthetic beans init --- .../java/io/quarkus/grpc/deployment/GrpcServerProcessor.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/grpc/deployment/src/main/java/io/quarkus/grpc/deployment/GrpcServerProcessor.java b/extensions/grpc/deployment/src/main/java/io/quarkus/grpc/deployment/GrpcServerProcessor.java index ba8fe24417ab5..bd2b6a848dcc3 100644 --- a/extensions/grpc/deployment/src/main/java/io/quarkus/grpc/deployment/GrpcServerProcessor.java +++ b/extensions/grpc/deployment/src/main/java/io/quarkus/grpc/deployment/GrpcServerProcessor.java @@ -29,6 +29,7 @@ import io.quarkus.arc.deployment.AdditionalBeanBuildItem; import io.quarkus.arc.deployment.AnnotationsTransformerBuildItem; import io.quarkus.arc.deployment.CustomScopeAnnotationsBuildItem; +import io.quarkus.arc.deployment.SyntheticBeansRuntimeInitBuildItem; import io.quarkus.arc.deployment.ValidationPhaseBuildItem; import io.quarkus.arc.processor.AnnotationsTransformer; import io.quarkus.arc.processor.BeanInfo; @@ -38,6 +39,7 @@ import io.quarkus.deployment.IsNormal; import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.annotations.Consume; import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; import io.quarkus.deployment.builditem.BytecodeTransformerBuildItem; @@ -314,6 +316,7 @@ void registerBeans(BuildProducer beans, @BuildStep @Record(value = ExecutionTime.RUNTIME_INIT) + @Consume(SyntheticBeansRuntimeInitBuildItem.class) ServiceStartBuildItem initializeServer(GrpcServerRecorder recorder, GrpcConfiguration config, ShutdownContextBuildItem shutdown, List bindables, LaunchModeBuildItem launchModeBuildItem,