Class WireMockConfiguration
java.lang.Object
org.springframework.cloud.contract.wiremock.WireMockConfiguration
- All Implemented Interfaces:
org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
@Configuration(proxyBeanMethods=false)
@EnableConfigurationProperties(org.springframework.cloud.contract.wiremock.WireMockProperties.class)
public class WireMockConfiguration
extends Object
implements org.springframework.context.SmartLifecycle
Configuration and lifecycle for a Spring Application context that wants to run a
WireMock server. Can be used by adding
@AutoConfigureWireMock to a Spring Boot JUnit test. To
configure the properties of the wiremock server you can use the AutoConfigureWireMock
annotation, or add a bean of type Options (via
WireMockSpring.options()) to your test context.- Author:
- Dave Syer, Matt Garner, Waldemar Panas
-
Field Summary
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
WireMockConfiguration
public WireMockConfiguration()
-
-
Method Details
-
init
- Throws:
IOException
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
getPhase
public int getPhase()- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.springframework.context.SmartLifecycle
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartupin interfaceorg.springframework.context.SmartLifecycle
-
stop
- Specified by:
stopin interfaceorg.springframework.context.SmartLifecycle
-