title: Spring Data Rest: how to customize the "_links" property representation?
body: <p>I'm trying to customize the urls linked in the <strong>"_links"</strong> property of the <strong>Spring Data Rest</strong> JSON entity representation.</p>
  
  <p>Following the documentation at the point <em>"16.5.3. Customizing the representation"</em> (see <a href="http://docs.spring.io/spring-data/rest/docs/current/reference/html/#_customizing_the_representation" rel="nofollow">http://docs.spring.io/spring-data/rest/docs/current/reference/html/#_customizing_the_representation</a>),
  I should create a <em>custom</em> <code>ConversionService</code> with <em>my own</em> <code>Converter</code>. But how exactly can I do that?</p>
  
  <p>By the way, I don't understand the reason why I have to do this, since Spring Data Rest uses a <code>RepositoryEntityController</code> that builds the URLS calling a <em>"toResources"</em> method of the class <code>AbstractRepositoryRestController</code>, that builds the urls calling its own <em>"getDefaultSelfLink"</em> method.</p>
  
  <p>Why not <em>@Override</em> one (or both) of those methods in some way?</p>
  
  <p>My doubt is: how the converter can replace the behaviour of this implementation? It's because is called after the URL construction?
  If the answer is yes, the problem is that the converter can modify an URL that is already been built in a previous moment, while <strong>I would prefer to create the url with my customization only one time</strong> (and not converting it after).</p>
  
  <p>It's possible in any way? <strong>How to customize the RepositoryEntityController behaviour</strong>?</p>
  
  <p>Thanks.</p>