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 ElementsModifier and TypeOptional ElementDescriptionbooleanEnables auto-configuration ofGrpcChannelFactorybeans.booleanEnables auto-configuration ofGrpcServerFactorybeans.booleanEnables auto-configuration of theGrpcServletRegistration.
-
Element Details
-
enableServlet
@PropertyMapping("spring.grpc.server.servlet.enabled") boolean enableServletEnables auto-configuration of theGrpcServletRegistration. Defaults tofalsesince 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 enableServerFactoryEnables auto-configuration ofGrpcServerFactorybeans. Defaults tofalsesince 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 enableChannelFactoryEnables auto-configuration ofGrpcChannelFactorybeans. Defaults tofalsesince additional channel factories are unnecessary when using test in-process transport.- Returns:
- if channel factories are enabled
- Default:
false
-