Spring HATEOAS Linking to Another Service
<p>Spring HATEOAS works great at linking to another method in the same application.  For example:</p>

<pre><code>Greeting greeting = new Greeting(String.format(TEMPLATE, name));
greeting.add(linkTo(methodOn(GreetingController.class).greeting(name)).withSelfRel());
</code></pre>

<p>If one were to implement a microservice architecture, then most of the linked methods would be part of a different service and different Java project.</p>

<p>The only way I can see of to add a link to a method outside of the existing project is to hard-code in the URL (or put it in an external configuration).</p>

<p>Are there any alternatives to dynamically create the URL?  For instance, is it possible to use Spring HATEOAS in conjunction with a Service Registry (like Eureka)?</p>