title: how to set resource relations through annotations in Spring Hateoas?
body: <p>Is there a way to set resource relations through annotations? I made a similar question a some time ago but i've not been clear enough. I want to have something like this:</p>
  
  <pre><code>public class UserResource {
  
       private String username;
  
       @Relation(value = "{servicebaseUrl}/classes/${value}", rel = "class")
       private String classId;
  
       // Getters and setters
  }
  </code></pre>
  
  <p>And then add a message converter which would add links only if client sends <code>Accept = application/hal+json</code>, avoiding  the fact of doing two different controller endpoints for <code>application/hal+json</code> and <code>application/json</code>. Does Spring offers something like that? I found that it actually offers this <code>@Relation</code> annotation(or similar one) but it seems that it is not for the same purposes.</p>