Annotation Type AutoConfigureWireMock
-
@Target(TYPE) @Retention(RUNTIME) @Documented @Import(WireMockConfiguration.class) @PropertyMapping(value="wiremock.server", skip=ON_DEFAULT_VALUE) @AutoConfigureHttpClient @Inherited public @interface AutoConfigureWireMock
Annotation for test classes that want to start a WireMock server as part of the Spring Application Context. The port, https port and stub locations (if any) can all be controlled directly here. For more fine-grained control of the server instance add a bean of typeOptionsto the application context.- Author:
- Dave Syer
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String[]filesThe resource locations to use for loading WireMock response bodies.inthttpsPortIf specified, configures WireMock instance to enable HTTPS on specified port.intportConfigures WireMock instance to listen on specified port.String[]stubsThe resource locations to use for loading WireMock mappings.
-
-
-
-
stubs
String[] stubs
The resource locations to use for loading WireMock mappings.When none specified, src/test/resources/mappings is used as default location.
To customize the location, this attribute must be set to the directory where mappings are stored.
- Returns:
- locations to read WireMock mappings from
- Default:
- {""}
-
-
-
files
String[] files
The resource locations to use for loading WireMock response bodies.When none specified, src/test/resources/__files is used as default.
To customize the location, this attribute must be set to the parent directory of __files directory.
- Returns:
- locations to read WireMock response bodies from
- Default:
- {""}
-
-