maciejwalkowiak / wiremock-spring-boot

WireMock Spring Boot drastically simplifies testing HTTP clients in Spring Boot & Junit 5 based integration tests.
MIT License
218 stars 13 forks source link

Configure WireMock with port #36

Open tomasbjerre opened 4 months ago

tomasbjerre commented 4 months ago

I had to add this code, would be nice if this was added to the tool.

  private @Value("${wiremock.server.url}") String wireMockUrl;

  @PostConstruct
  public void basePostConstruct() throws MalformedURLException {
    WireMock.configureFor(new URL(wireMockUrl).getPort());
  }