Annotation Type EnableNatsStreamingServer
-
@Retention(RUNTIME) @Target(TYPE) @Documented @Inherited public @interface EnableNatsStreamingServer
Annotation that can be specified on a test class that runs Nats based tests. Provides the following features over and above the regular SpringTestContextFramework:- Registers a
NatsStreamingServerbean with theNatsStreamingServerbean name.
The typical usage of this annotation is like:
@
SpringBootTest@EnableNatsStreamingServerpublic class MyNatsTests { @AutowiredprivateNatsStreamingServernatsServer; } - Registers a
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String[]configPasses the original parameters toNatsStreamingServer#setConfig(String...)for startupNatsStreamingConfigintportPasses port number toNatsStreamingServer#setConfig(String...)booleanrandomPortRandom portlongtimeoutMsDefines the startup and teardown timeout
-
-
-
-
config
String[] config
Passes the original parameters toNatsStreamingServer#setConfig(String...)for startupNatsStreamingConfig- Default:
- {}
-
-