I have this controller
<code>@RequestMapping(value="/sayhi/{id}", method=RequestMethod.GET)
public ResponseEntity<Sting> sayHello(@PathVariable("id") String id) {
//code to say hi
}
</code>
<code>@RequestMapping(value="/sayhi/{id}", method=RequestMethod.GET)
public ResponseEntity<Sting> sayHello(@PathVariable("id") String id) {
//code to say hi
}
</code>
@RequestMapping(value="/sayhi/{id}", method=RequestMethod.GET)
public ResponseEntity<Sting> sayHello(@PathVariable("id") String id) {
//code to say hi
}
I have a wiremock which does urlPathMatching with a value for id – lets say “123” as follows
<code>WireMock.urlPathMatching("/sayhi/123")
</code>
<code>WireMock.urlPathMatching("/sayhi/123")
</code>
WireMock.urlPathMatching("/sayhi/123")
and then it returns a response with a body when executed on which I have put asserts. How can I make the urlPathMatching dynamic so that instead of 123 we can send anything and how do I write the HTTP GET call for that