Class GrpcServerPortInfoAutoConfiguration

java.lang.Object
org.springframework.boot.grpc.test.autoconfigure.GrpcServerPortInfoAutoConfiguration

@AutoConfiguration(before=GrpcServerAutoConfiguration.class) @ConditionalOnClass(GrpcServerStartedEvent.class) public final class GrpcServerPortInfoAutoConfiguration extends Object
Auto-configuration for an ApplicationListener that sets Environment properties for the port that a gRPC server is actually listening on. The property "local.grpc.server.port" can be injected directly into tests using @Value or obtained through the Environment.

Properties are automatically propagated up to any parent context.

Since:
4.1.1
Author:
Dave Syer, Chris Bono, Phillip Webb, Stephane Nicoll
  • Field Details

  • Constructor Details

    • GrpcServerPortInfoAutoConfiguration

      public GrpcServerPortInfoAutoConfiguration()