Url Variables
You can use url variables to define the base url of the client.
@HttpExchange("${api.post.url}")
public interface PostApi {
@GetExchange("/typicode/demo/posts/{id}")
Post getPost(@PathVariable("id") int id);
}
application.yml
api:
post:
url: https://jsonplaceholder.typicode.com