Annotation Interface AutoConfigureTestGrpcTransport


@Target(TYPE) @Retention(RUNTIME) @Documented @Inherited @ImportAutoConfiguration public @interface AutoConfigureTestGrpcTransport
Annotation that can be applied to a test class to enable test in-process gRPC transport. Starts a test in-process gRPC server and configures a GrpcChannelFactory that will connect all targets to it.
Since:
4.1.0
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Enables auto-configuration of GrpcChannelFactory beans.
    boolean
    Enables auto-configuration of GrpcServerFactory beans.
    boolean
    Enables auto-configuration of the GrpcServletRegistration.
  • Element Details

    • enableServlet

      @PropertyMapping("spring.grpc.server.servlet.enabled") boolean enableServlet
      Enables auto-configuration of the GrpcServletRegistration. Defaults to false since servlet registration is unnecessary when using test in-process transport.
      Returns:
      if servlet support is enabled
      Default:
      false
    • enableServerFactory

      @PropertyMapping("spring.grpc.server.factory.enabled") boolean enableServerFactory
      Enables auto-configuration of GrpcServerFactory beans. Defaults to false since additional server factories are unnecessary when using test in-process transport.
      Returns:
      if server factories are enabled
      Default:
      false
    • enableChannelFactory

      @PropertyMapping("spring.grpc.client.channelfactory.enabled") boolean enableChannelFactory
      Enables auto-configuration of GrpcChannelFactory beans. Defaults to false since additional channel factories are unnecessary when using test in-process transport.
      Returns:
      if channel factories are enabled
      Default:
      false