diff --git a/spring-cloud-contract-wiremock/src/main/java/org/springframework/cloud/contract/wiremock/AutoConfigureWireMock.java b/spring-cloud-contract-wiremock/src/main/java/org/springframework/cloud/contract/wiremock/AutoConfigureWireMock.java index 72154793b9..3e667e4c19 100644 --- a/spring-cloud-contract-wiremock/src/main/java/org/springframework/cloud/contract/wiremock/AutoConfigureWireMock.java +++ b/spring-cloud-contract-wiremock/src/main/java/org/springframework/cloud/contract/wiremock/AutoConfigureWireMock.java @@ -46,12 +46,50 @@ import org.springframework.context.annotation.Import; @Inherited public @interface AutoConfigureWireMock { + /** + * Configures WireMock instance to listen on specified port. + *
+ * Set this value to 0 for WireMock to listen to a random port. + *
+ * @return port to which WireMock instance should listen to + */ int port() default 8080; + /** + * If specified, configures WireMock instance to enable HTTPS on specified + * port. + *+ * Set this value to 0 for WireMock to listen to a random port. + *
+ * @return port to which WireMock instance should listen to + */ int httpsPort() default -1; + /** + * 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. + *
+ * @return locations to read WireMock mappings from + */ String[] stubs() default { "" }; + /** + * 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. + *
+ * @return locations to read WireMock response bodies from + */ String[] files() default { "" }; }