Class GrpcServerPortInfoAutoConfiguration

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

@AutoConfiguration(beforeName="org.springframework.boot.grpc.server.autoconfigure.GrpcServerAutoConfiguration") @ConditionalOnClass(org.springframework.grpc.server.lifecycle.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

    • PROPERTY_NAME

      public static final String PROPERTY_NAME
      Property that contains the port that a gRPC server is actually listening on.
      See Also:
  • Constructor Details

    • GrpcServerPortInfoAutoConfiguration

      public GrpcServerPortInfoAutoConfiguration()