title: Spring RepositoryRestResource with path param?
body: <p>The <a href="http://docs.spring.io/spring-data/rest/docs/2.6.3.RELEASE/reference/html/#repository-resources.collection-resource" rel="nofollow noreferrer">RepositoryRestResource</a> annotation in Spring creates endpoints on a defined path fragment, e.g.</p>
  
  <pre><code>@RepositoryRestResource(path = "expenses")
  </code></pre>
  
  <p>would create endpoints like:</p>
  
  <pre><code>/expenses
  /expenses/search
  /expenses/1
  </code></pre>
  
  <p>Is there a way to include a path parameter in that repository? I want to see expenses only related to a specific user, e.g. "michael":</p>
  
  <pre><code>/users/michael/expenses
  /users/michael/expenses/search
  /users/michael/expenses/1
  </code></pre>
  
  <hr>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>I managed to get halfway there by using the same annotation on the <code>User</code>, which results in the right endpoint:</p>
  
  <pre><code>/users/1/expenses
  </code></pre>
  
  <p>BUT I cannot POST anything on that resource - the server answers with empty body.</p>