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
  • Constructor Details

    • WireMockConfiguration

      public WireMockConfiguration()
  • Method Details

    • init

      @PostConstruct public void init() throws IOException
      Throws:
      IOException
    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle
    • isAutoStartup

      public boolean isAutoStartup()
      Specified by:
      isAutoStartup in interface org.springframework.context.SmartLifecycle
    • stop

      public void stop(Runnable callback)
      Specified by:
      stop in interface org.springframework.context.SmartLifecycle