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@AutoConfigureWireMockto a Spring Boot JUnit test. To configure the properties of the wiremock server you can use the AutoConfigureWireMock annotation, or add a bean of typeOptions(viaWireMockSpring.options()) to your test context.- Author:
- Dave Syer, Matt Garner, Waldemar Panas
-
-
Constructor Summary
Constructors Constructor Description WireMockConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPhase()voidinit()booleanisAutoStartup()booleanisRunning()voidstart()voidstop()voidstop(Runnable callback)
-
-
-
Method Detail
-
init
@PostConstruct public void init() throws IOException
- 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
public void stop(Runnable callback)
- Specified by:
stopin interfaceorg.springframework.context.SmartLifecycle
-
-