Open
Description
Page
_docs/solutions/spring-boot.md
Details
The example given in "Using WireMock with Spring Boot" has an extra stubFor()
and it causes a compiling error (and some confusion). It should be:
wiremock.stubFor(get("/todolist").willReturn(aResponse()
.withHeader("Content-Type", "application/json")
.withBody("""
[
{ "id": 1, "userId": 1, "title": "my todo" },
]
""")
));
instead of:
wiremock.stubFor(stubFor(get("/todolist").willReturn(aResponse()
.withHeader("Content-Type", "application/json")
.withBody("""
[
{ "id": 1, "userId": 1, "title": "my todo" },
]
""")
)));
Suggested Edits
Remove the extra stubFor()
.
References
No response
Activity