Skip to content

Commit

Permalink
Various tweaks to Spring boot URLs and links
Browse files Browse the repository at this point in the history
  • Loading branch information
tomakehurst committed Dec 2, 2024
1 parent e6f7e35 commit 37b767c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 28 deletions.
2 changes: 1 addition & 1 deletion _data/doc-categories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ java:
pages:
- junit-jupiter
- junit-extensions
- spring-boot
- spring-boot-integration
- java-usage
- configuration
- running-without-http-server
Expand Down
2 changes: 1 addition & 1 deletion _docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ <h2>By technology</h2>
<img src="{{ '/images/logos/technology/python.svg' | absolute_url }}" />
Python
</a>
<a class="card" href="./spring-boot">
<a class="card" href="./solutions/spring-boot-integration">
<img src="{{ '/images/logos/technology/spring.svg' | absolute_url }}" />
Spring Boot
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,22 @@ description: The team behind Spring Cloud Contract have created a library to sup
redirect_from:
- "/docs/spring-boot.html"
logo: /images/logos/technology/spring.svg
hide-disclaimer: true
---

<div class="cloud-callout"><a href="https://www.wiremock.io?utm_source=oss-docs&utm_medium=oss-docs&utm_campaign=cloud-callouts-solutionspringboot&utm_id=cloud-callouts&utm_term=cloud-callouts-solutionspringboot" target="_BLANK">Centralize and scale your API mocks with WireMock Cloud.</a></div>

## WireMock Spring Boot

[WireMock Spring Boot](https://github.com/wiremock/wiremock-spring-boot) is the simplest way to integrate Spring Boot, Junit 5 and WireMock.
WireMock's official Spring Boot integration library is the simplest way to configure Spring Boot, Junit 5 and WireMock to work together.


It includes fully declarative WireMock setup, supports multiple `WireMockServer` instances, automatically sets Spring environment properties,
and does not pollute Spring application context with extra beans.

Example:

```java
@SpringBootTest
@EnableWireMock
class DefaultInstanceTest {

@Value("${wiremock.server.baseUrl}")
private String wiremockUrl;

@Test
void returnsTodos() {
WireMock.stubFor(get("/ping")
.willReturn(aResponse()
.withStatus(200)));

RestAssured
.when()
.get(this.wiremockUrl + "/ping")
.then()
.statusCode(200);
}
}
```
See [WireMock Spring Boot Integration](/docs/spring-boot/) for details on installation and usage.

You can contribute or log an issue in the [GitHub project](https://github.com/wiremock/wiremock-spring-boot).

## Spring Cloud Contract

Expand Down
2 changes: 1 addition & 1 deletion _docs/spring-boot.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: docs
title: "Spring Boot Integration"
title: "WireMock Spring Boot Integration"
meta_title: Using WireMock's Spring Boot + JUnit 5 integration | WireMock
description: Integrating WireMock, Spring Boot and JUnit 5 via the official integration library.
---
Expand Down

0 comments on commit 37b767c

Please sign in to comment.