Annotation Type EnableNatsServer
-
@Retention(RUNTIME) @Target(TYPE) @Documented @Inherited public @interface EnableNatsServer
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
NatsServerbean with theNatsServerbean name.
The typical usage of this annotation is like:
@
SpringBootTest@EnableNatsServerpublic class MyNatsTests { @AutowiredprivateNatsServernatsServer; } - Registers a
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description StringbinaryFileFile to nats server binary so no download will be neededString[]configPasses the original parameters toNats.config(String...)for startupNatsConfigStringconfigFileConfig fileStringdownloadUrlCustom download URLintportSets nats port -1 means random portlongtimeoutMsDefines the startup and teardown timeout
-
-
-
-
configFile
String configFile
Config file- Default:
- ""
-
-
-
downloadUrl
String downloadUrl
Custom download URL- Default:
- ""
-
-
-
binaryFile
String binaryFile
File to nats server binary so no download will be needed- Default:
- ""
-
-
-
config
String[] config
Passes the original parameters toNats.config(String...)for startupNatsConfig- Default:
- {}
-
-