@Retention(value=RUNTIME) @Target(value=TYPE) @Documented @Inherited public @interface EnableNatsServer
TestContext
Framework:
NatsServer bean with the NatsServer bean name.
The typical usage of this annotation is like:
@org.springframework.boot.test.context.SpringBootTest@EnableNatsServerpublic class MyNatsTests { @org.springframework.beans.factory.annotation.AutowiredprivateNatsServernatsServer; }
| Modifier and Type | Optional Element and Description |
|---|---|
String |
binaryFile
File to nats server binary so no download will be needed
|
String[] |
config
Passes the original parameters to
Nats.config(String...) for startup
NatsConfig |
String |
configFile
Config file
|
String |
downloadUrl
Custom download URL
|
int |
port
Sets nats port
-1 means random port
|
long |
timeoutMs
Defines the startup and teardown timeout
|
public abstract String configFile
public abstract String downloadUrl
public abstract String binaryFile
public abstract String[] config
Nats.config(String...) for startup
NatsConfigCopyright © 2022. All rights reserved.